Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role assignments are not deleted when using targetScope = 'resourceGroup' and --mode Complete #10460

Closed
aucampia opened this issue Apr 17, 2023 · 4 comments
Labels
Needs: Author Feedback Awaiting feedback from the author of the issue

Comments

@aucampia
Copy link

Bicep version

$ az bicep version
Bicep CLI version 0.16.2 (de7fdd2b33)

Describe the bug
When I remove a 'Microsoft.Authorization/roleAssignments@2022-04-01' from my Bicep template with targetScope = 'resourceGroup' and deploy using az deployment group create ... --mode Complete the role assignment is not removed.

To Reproduce
Steps to reproduce the behaviour:

  • Add a 'Microsoft.Authorization/roleAssignments@2022-04-01' resource to a Bicep template and deploy it using az deployment group create ... --mode Complete.
  • Remove the role assignment from the Bicep template and deploy it using az deployment group create ... --mode Complete.
  • Check role assignments using Azure CLI or Azure portal.
  • Notice that the role assignment was not removed.

Additional context

This fails without even as much as a warning, this should probably be classified as a security vulnerability.

@alex-frankel
Copy link
Collaborator

Complete mode is, to be frank, an imperfect solution and this is a known issue.

We are very close to releasing Deployment Stacks (can think of this like complete mode v2) in public preview, which should not have this problem. If you are interested, we can add you to the deployment stacks private preview so you can test out the new functionality.

@aucampia
Copy link
Author

aucampia commented May 7, 2023

@alex-frankel enabling deployment stacks can be pursued separately, I have asked internally at my employer but there has been some controversy since it is not GA and there is a policy against using preview features.

If this is to be handled by deployment stacks, you can close this as a duplicate of #2690.

@aucampia
Copy link
Author

aucampia commented May 7, 2023

@alex-frankel
Copy link
Collaborator

Thanks @aucampia - we definitely are excited to GA Stacks ASAP :) I will close this as a duplicate per your suggestion.

@Azure Azure locked as resolved and limited conversation to collaborators Jun 8, 2023
@StephenWeatherford StephenWeatherford added Needs: Author Feedback Awaiting feedback from the author of the issue and removed awaiting response labels Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Author Feedback Awaiting feedback from the author of the issue
Projects
None yet
Development

No branches or pull requests

3 participants