Container App Environments support the assignment of managed identities within the portal, but not within the Bicep code. If an identity block is added, it is passed to the API and is successfully associated with the environment.
It is marked as "The property "identity" does not exist in the resource or type definition, although it might still be valid." when validating the code.
Could support for the identity block be added to BIcep?
Resource Type
Microsoft.App/managedEnvironments
Api Version
2024-03-01
Issue Type
Inaccurate property type(s)
Other Notes
Container App Environments support the assignment of managed identities within the portal, but not within the Bicep code. If an identity block is added, it is passed to the API and is successfully associated with the environment. It is marked as "The property "identity" does not exist in the resource or type definition, although it might still be valid." when validating the code. Could support for the identity block be added to BIcep?
Bicep Repro
resource existingManagedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = { name: managedIdName } ... resource containerAppEnv 'Microsoft.App/managedEnvironments@2024-03-01' = { name: caeName location: location identity: { type: 'UserAssigned' userAssignedIdentities: { '${existingManagedIdentity.id}': {} } } tags: tags properties: { peerAuthentication: { mtls: { enabled: false } } workloadProfiles: [ { workloadProfileType: 'Consumption' name: 'Consumption' } { workloadProfileType: workloadProfileType name: workloadProfileName minimumCount: workloadProfileTypeMin maximumCount: workloadProfileTypeMax } ] vnetConfiguration: { infrastructureSubnetId: existingVnet::existingSubnet.id internal: isInternal } appLogsConfiguration: { destination: 'log-analytics' logAnalyticsConfiguration: { customerId: existinglogAnalyticsWorkspace.properties.customerId sharedKey: existinglogAnalyticsWorkspace.listKeys().primarySharedKey } } } }
Confirm