This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.48k
stars
4.81k
forks
source link
Azure.Provisioning.{Resource}.CreateRoleAssignment(Role, ManagedIdentity) creates invalid bicep when managed identity in same deployment #47265
This expression is being used in an assignment to the "name" property of the "Microsoft.Authorization/roleAssignments" type, which requires a value that can be calculated at the start of the deployment. Properties of managedIdentity which can be calculated at the start include "apiVersion", "id", "name", "type".bicep[BCP120](https://aka.ms/bicep/core-diagnostics#BCP120)
This creates invalid bicep:
Which results in the following error: