You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am constantly hit with issues using Microsoft.App when using conditions and references. The error that I get is the following:
New-AzResourceGroupDeployment: 12:03:24 - Error: Code=InvalidTemplateDeployment; Message=The template deployment 'deploy2' is not valid according to the validation procedure. The tracking id is '94c4d55a-f9f4-46a9-81ae-2c50ecade6ad'. See inner errors for details.
New-AzResourceGroupDeployment: 12:03:24 - Error: Code=ValidationForResourceFailed; Message=Validation failed for a resource. Check 'Error.Details[0]' for more information.
New-AzResourceGroupDeployment: 12:03:24 - Error: Code=ManagedEnvironmentInvalidSchema; Message=Invalid request body for environment. Path: $. Does not conform to Managed Environment schema, please visit for more information https://docs.microsoft.com/azure/container-apps/azure-resource-manager-api-spec?tabs=arm-template#container-apps-environment
New-AzResourceGroupDeployment: The deployment validation failed
Deployment does not even starts, it just gives this error on staring the deployment, What if is not able to generate any data.
The workaround to use conditions and references which is not pleasant is to get customerId and primarySharedKey before starting the deployment of the template and pass them as parameters.
The same behavior can be seen if you try to configure properties.customDomainConfiguration.certificateKeyVaultProperties.keyVaultUrl and have condition on certificateKeyVaultProperties. Usually you would use reference to secretUri of the secret but in order to overcome it you need to use concatination to build the URI.
Same issue is present with Microsoft.App/managedEnvironments/certificates@2024-08-02-preview and properties.certificateKeyVaultProperties.keyVaultUrl when having condition on certificateKeyVaultProperties,
In Microsoft.App/containerApps@2024-08-02-preview properties.secrets same issue occurs.
It seems that the whole RP is build in some weird way that it has this bug.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
btw when you implement any of the workarounds where you pass values via module parameters what-if also stops working which is additional downside of using these workarounds.
@alex-frankel@stephaniezyen - this seems likely to be a resource provider preflight implementation issue - we may need to follow up with the owners of the service.
Bicep version
Bicep CLI version 0.31.92 (b065093)
Describe the bug
I am constantly hit with issues using Microsoft.App when using conditions and references. The error that I get is the following:
Deployment does not even starts, it just gives this error on staring the deployment, What if is not able to generate any data.
To Reproduce
Steps to reproduce the behavior:
To reproduce here is where code works:
However as soon as you add some conditions you get the error above. Here is example where error is generated.
The workaround to use conditions and references which is not pleasant is to get customerId and primarySharedKey before starting the deployment of the template and pass them as parameters.
The same behavior can be seen if you try to configure properties.customDomainConfiguration.certificateKeyVaultProperties.keyVaultUrl and have condition on certificateKeyVaultProperties. Usually you would use reference to secretUri of the secret but in order to overcome it you need to use concatination to build the URI.
Same issue is present with Microsoft.App/managedEnvironments/certificates@2024-08-02-preview and properties.certificateKeyVaultProperties.keyVaultUrl when having condition on certificateKeyVaultProperties,
In Microsoft.App/containerApps@2024-08-02-preview properties.secrets same issue occurs.
It seems that the whole RP is build in some weird way that it has this bug.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: