-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Improve iam_group exception handling #45599
Conversation
Use AnsibleAWSModule for iam_group and handle BotoCoreErrors as well as ClientErrors. Use fail_json_aws to improve error messages
Unfortunately there is no test suite for iam_group, and I ran out of time to perform full testing on this change, so if anyone has a test suite to hand, I'd be grateful if they could run it in. I started a test suite so I can always come back to that later. |
cc @infectsoldier @naslanidis |
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.
Would be nice to have tests but this looks all very straightforward.
Update some of the read-only IAM permissions (this is not sufficient to run the test suite but it gets further than it did until it tries to add a (non-existent) user)
@s-hertel I added a trivial test suite. |
SUMMARY
Use AnsibleAWSModule for iam_group and handle BotoCoreErrors
as well as ClientErrors. Use fail_json_aws to improve error messages
Fixes #45593
ISSUE TYPE
COMPONENT NAME
iam_group
ANSIBLE VERSION
ADDITIONAL INFORMATION
Candidate for backport to all supported versions of ansible