Azure / Azure/azure-powershell
[Feature]: New-AzRoleAssignment cmdlet should support SupportsShouldProcess
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description of the new feature
New-AzRoleAssignment cmdlet should support `-Confirm` and `-WhatIf` to maintain parity with Set-AzRoleAssignment and `Remove-AzRoleAssignment`.
I was writing a script and wanted to use -Confirm for or RBAC write but noticed that `New-AzRoleAssignment` does not support it even `Set-AzRoleAssignment` does. This makes scripting really weird.
* Looks like `SetAzureRoleAssignmentCommand` was added with confirmation support but it was never added into `New-AzRoleAssignment`
* Not sure about history of `Remove-AzRoleAssignment`
### Proposed implementation details (optional)
_No response_
Contributor guide
Research direction
Inspect the New-AzRoleAssignment cmdlet implementation and compare it with SetAzureRoleAssignmentCommand and Remove-AzRoleAssignment, especially their confirmation support. Verify how SupportsShouldProcess, -Confirm, and -WhatIf are exposed and exercised, then run the relevant role-assignment tests if available. Done means New-AzRoleAssignment provides behavior consistent with the other role-assignment cmdlets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- authorization, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100