Hello there people! I hope you are doing great.
I have created a terraform repository to deploy certain infrastructure to Azure, which includes a block based on azurerm_container_app resoure with the correct parameters in its template (currently testing with 0.25 cpu and 0.5 Gi).
On top of that, there's another repo with the app itself + Dockerfile + GitHub Actions Workflow YAML to deploy a container with our app.
Everything was working perfectly until the day before yesterday or so, and now I'm getting the following error (some parts might be redacted):
ERROR: (ContainerAppInvalidResourceTotal) The total requested CPU and memory resources for this application (CPU: 2.5, memory: 5) is invalid. Total CPU and memory for all containers defined in a Container App must add up to one of the following CPU - Memory combinations: [cpu: 0.25, memory: 0.5Gi]; [cpu: 0.5, memory: 1.0Gi]; [cpu: 0.75, memory: 1.5Gi]; [cpu: 1.0, memory: 2.0Gi]; [cpu: 1.25, memory: 2.5Gi]; [cpu: 1.5, memory: 3.0Gi]; [cpu: 1.75, memory: 3.5Gi]; [cpu: 2.0, memory: 4.0Gi]
The step that performs the container app deployment inside the action is this single line command:
/usr/bin/az containerapp update --name [REDACTED] --resource-group [REDACTED] --image [REDACTED] --revision-suffix [REDACTED] --container-name [REDACTED]
Things to consider:
- I ruled out Container Apps Build and Deploy action because even though a Dockerfile was specified and an image was built, the app deployed was the default one by Oryx that the documentation states (which shouldn' t have happened as far as I could understand when reading the documentation inside the Marketplace). I've tried debugging it but couldn't find the reason why and decided to take a different approach.
- As far as I could see and based on what was defined on the code, there should be only one Container App running, so the
(ContainerAppInvalidResourceTotal)
error type makes little sense to me. Also, the terraform code related to the Container Apps hasn't been modified for about a month and, except for what was explained on item 1, everything was working perfectly up to this point.
- The only place where I specify the resources used by a container is inside the template block of the terraform's repository mentioned above, which is very close to the example (see below the excerpt from the documentation referenced before).
template {
container {
name = "examplecontainerapp"
image = "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest"
cpu = 0.25
memory = "0.5Gi"
}
}
- Before this happened, our image was being used and containerapp deployment was acting as expected.
- I've searched far and wide for a while about this but was unable to find fruitful ideas / solutions.
Thank you very much and have a wonderful day!