-
Notifications
You must be signed in to change notification settings - Fork 808
Description
Is your feature request related to a problem? Please describe.
We have written a bunch of Bicep code over the past 2 years and the one problem we consistently run into is conflicts on role assignments in our templates because the role assignment already exists. Many of these role assignments were created when the resource was created with ARM templates in the past. Now, when creating with our Bicep templates, the GUID is different and the deployment fails because their is a conflict on the role assignment. When I heard about @onlyIfNotExists(), I thought it was the solution to this problem but unfortunately after testing, it doesn't look like it works this way.
Describe the solution you'd like
We would like the @onlyIfNotExists() decorator to check if a role assignment already exists for the same identity, role, and scope as an existing role assignment. It would only deploy if it did not exist. This would make our deployments much smoother.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status