An Azure service that provides a general-purpose, serverless container platform.
Change the Flex job’s aggregate container allocation from 1 vCPU/2 GiB to 1 vCPU/4 GiB—or another combination listed in the error—because Flex validates the sum of resources requested by the main container and all sidecars.
Sidecars on a Dedicated workload profile
Sidecars do not implicitly consume the CPU and memory allocation configured for the main container. Each container has its own resources.cpu and resources.memory settings. For a replica containing a main container and sidecars:
- CPU and memory requests are summed across all containers.
- Containers share network and applicable storage resources and have the same application lifecycle.
- The resulting replica is scheduled onto the Dedicated workload-profile pool.
- Multiple replicas and apps can share a Dedicated profile instance, whose usable capacity is slightly below its nominal capacity because the runtime reserves some resources. ^1^ ^2^
For example, this replica requests a total of 1 vCPU and 4 GiB:
"containers": [
{
"name": "main",
"resources": { "cpu": 0.75, "memory": "3Gi" }
},
{
"name": "sidecar",
"resources": { "cpu": 0.25, "memory": "1Gi" }
}
]
Dedicated billing is per running workload-profile instance rather than separately for each container’s allocation. Multiple apps can be deployed to the same profile. ^3^
Flex status and the failed assignment
Flexible workload profiles are still in preview, not generally available. They are available only in listed regions, require at least a /25 subnet, run in a single-tenant compute pool, and cannot scale to zero. ^2^
The screenshot shows that profile selection succeeds, but the job update fails resource validation. The job currently requests:
- Total CPU: 1 vCPU
- Total memory: 2 GiB
The validation message requires one of these aggregate combinations across all containers:
| vCPU | Memory |
|---|---|
| 0.25 | 1 GiB |
| 0.5 | 2 GiB |
| 1 | 4 GiB |
| 2 | 8 GiB |
| 4 | 16 GiB |
| 8 | 32 GiB |
| 16 | 64 GiB |
| 32 | 128 GiB |
Therefore, keep 1 vCPU and change the aggregate memory to 4 GiB. Alternatively, keep 2 GiB and reduce aggregate CPU to 0.5 vCPU.
In the Azure portal:
- Open the Container App Job.
- Open its container configuration and edit the CPU/memory allocation for the main container and any sidecars.
- Ensure their totals equal one complete pair above—for example,
1 vCPU / 4 GiB. - Save the revision/job configuration with the Flex workload profile selected.
- Confirm that the update completes without the resource-combination validation error.
The profile label “Flex – vCPUs: 32, Memory: 128 Gi” does not require every job to request the full 32/128 allocation. The app/job still declares its own per-replica resources, but those resources must conform to the combinations accepted by that profile.
To verify which profile types are supported in the environment’s region, run:
az containerapp env workload-profile list-supported \
--location <LOCATION> \
--query "[].{Name:name,Cores:properties.cores,MemoryGiB:properties.memoryGiB,Category:properties.category}" \
-o table
The returned Name is the value used when adding or updating a workload profile. ^4^
References