-
Notifications
You must be signed in to change notification settings - Fork 336
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
Azure rm role 20201018 #301
Azure rm role 20201018 #301
Conversation
Co-authored-by: Fred-sun <[email protected]>
@Fred-sun |
@Fred-sun |
I will recheck this! Thank you very much! |
Thank you @Fred-sun and @haiyuazhang , I know this was a large change to review, so I appreciate your effort. |
SUMMARY
Fixes multiple bugs, along with general cleanup and improvement of azure_rm_roleassignment and info modules. The additions in this PR are assuming the merging of #288 since there are shared dependencies created in azure_rm_common.py . Since I have created this branch from the branch pushed in #288, this PR strictly supersedes that one.
Besides improving detection of existing assignments for idempotency purposes, and more closely aligning the ansible module with the python SDK's requirements, there are 3 main methods for identifying a unique role assignment that have been further developed:
id: passing the fqid to get_by_id(id) in python sdk
scope and name: makes a call to get(scope, name) in the python sdk
scope, assignee_object_id and role_definition_id: fetches a list of all assignments, and filters to the (if exists,) single possible unique instance.
Fixes #145
Fixes #266
Fixes #283
ISSUE TYPE
COMPONENT NAME
azure_rm_roleassignment
azure_rm_roleassignment_info
ADDITIONAL INFORMATION
I have included integration tests for roleassignment modules, however I'm not certain what the test environment looks like, so I had to assume what would be OK to assign and delete based on a variable "{{ resource_group }}" that I've seen in other tests. If this needs changing let me know.