-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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] BREAKING CHANGE: az role assignment delete
: Stop deleting all role assignments by default
#30470
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
@@ -355,7 +355,7 @@ class PrincipalType(str, Enum): | |||
'JSON description.') | |||
|
|||
with self.argument_context('role assignment delete') as c: | |||
c.argument('yes', options_list=['--yes', '-y'], action='store_true', help='Continue to delete all assignments under the subscription') | |||
c.argument('yes', options_list=['--yes', '-y'], action='store_true', help='Currently no-op.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deliberately kept --yes
to avoid causing breaking changes to users who are adding --yes
to the az role assignment delete
command and also in case we want to bring #15277 from the dead.
2e254e3
to
ff7d0fd
Compare
az role assignment delete
: Stop deleting all role assignments by defaultaz role assignment delete
: Stop deleting all role assignments by default
Related command
az role assignment delete
Description
Close #13577
az role assignment delete
is an insane footgun. Even though #8862 added a prompt, it is still super dangerous.This PR changes this behavior so that
az role assignment delete
does nothing if none of--ids
,--assignee
,--role
,--resource-group
,--scope
is provided.If you truly want to delete all role assignments, use
A more aggressive solution is to make
--scope
a required argument foraz role assignment delete
(#30471).Testing Guide