Open ChrisTrailight opened 1 year ago
Hi @ChrisTrailight
I believe you have come across a bug related to the new featureset, which is only available in api 2022-11-01-preview
This is still marked as preview and was just recently announced:
Given it's preview I would recommend the following ...
1) Search and then open an issue over here:
1) You could just mix the Consumption with Dedicated for testing for now, until it's resolved.
- I also tested with a dedicated D4, scaled down to min and max of 1 node, then only deployed apps to the consumption, it seems having the second dedicated plan was enough to bypass (workaround) the error. Not ideal, however given it's preview, at least this could unblock your testing.
on your ManagedEnv, add the following.
workloadProfiles: [
{
workloadProfileType: 'Consumption'
name: 'Consumption'
}
{
workloadProfileType: 'D4'
name: 'Dedicated-D4'
minimumCount: 3
maximumCount: 5
}
]
on your container app, add the following.
properties: {
managedEnvironmentId: managedENV.id
workloadProfileName: containerAppInfo.?workloadProfileName ?? null
e.g.
properties: {
managedEnvironmentId: managedENV.id
workloadProfileName: 'Dedicated-D4'
@ChrisTrailight
okay adding more info, I was able to find the cause
of the issue.... again, this would likely be revealed once the schema is published.
workloadProfile name
should be required without it you will get the error, however with the name, it works as expected.
workloadProfiles: [
{
workloadProfileType: 'Consumption'
name: 'Consumption' // <-- required
}
]
I think it's still worth opening the issue against that other repo on this, would you mind doing that?
Moving this to bicep-types-az, but agree opening a separate issue in the repo @brwilkinson mentioned would be the right next step to get this resolved.
Thank you very much @brwilkinson. Have tested and confirmed the fix. Specifying the name parameter in the workloadProfile declaration allows the deployment to succeed against an existing resource. I have opened the issue with the container apps team as requested. Thanks again for your help.
Bicep version: 0.16.2
When deploying a container app to a managed container app environment configured to use a workload profile of 'Consumption', after the first deployment, subsequent deployments fail with the error
Expected behaviour:
The container app environment deployment would either succeed or have its state updated depending on the template inputs and then succeed
Steps to reproduce:
bicep snippet: