Open DavidMrLane opened 1 month ago
@DavidMrLane this seems the same as #178
yes you're correct. Adding an output statement allowed it to deploy, and removing it causes the validation to fail again.
Very weird.
This is odd, but it might be a bug in the deployment engine. I'll investigate this.
Confirmed it's a bug. Working on a fix now.
Thanks for confirming @shenglol. And @DavidMrLane - thank you for finding and reporting this.
@shenglol any updates on this issue?
Bicep version 0.30.23
Resource and API version Microsoft.Graph/groups@v1.0
Auth flow Same errors on pipeline and when run manually
Deployment details Fails at validation, before deployment
Describe the bug Having app.identity.principalId as a group member, produced the error:
Deployment template validation failed: 'The resource 'Microsoft.App/containerApps/providedAppName' is not defined in the template
When app.identity.principalId is removed/commented the template deploys, even though there are references to app.name
To Reproduce This is my template:
extension microsoftGraph
param appName string param appNameInitMiName string
resource app 'Microsoft.App/containerApps@2024-02-02-preview' existing = { name: appName } resource appInitMi 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = { name: appNameInitMiName }
resource schemaDataOperator 'Microsoft.Graph/groups@v1.0' = { displayName: 'Azure-${app.name}-dataOperator' mailEnabled: false mailNickname: guid('Azure-${app.name}-dataOperator') securityEnabled: true uniqueName: 'Azure-${app.name}-dataOperator' members: [ appInitMi.properties.principalId app.identity.principalId ] } resource schemaDdlAdmin 'Microsoft.Graph/groups@v1.0' = { displayName: 'Azure-${app.name}-ddlAdmin' mailEnabled: false mailNickname: guid('Azure-${app.name}-ddlAdmin') securityEnabled: true uniqueName: 'Azure-${app.name}-ddlAdmin' members: [ appInitMi.properties.principalId ] }