-
Notifications
You must be signed in to change notification settings - Fork 341
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
aws_secrets.py: add on_missing and on_denied option #122
Conversation
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.
Thanks for this change, the code looks good but could you please add unit tests to tests/unit/plugins/lookup/test_aws_secret.py to cover these new options?
Yes, i will add some unit tests. |
/rebuild |
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.
Thanks for this. A couple of minor things.
Please see https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#linking-and-other-format-macros-within-module-documentation and https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to for more info.
changelogs/fragments/122-aws_secret-add-on_missing-and-on_denied-option.yml
Outdated
Show resolved
Hide resolved
adjust comment Co-authored-by: Mark Chappell <[email protected]>
adjust comment Co-authored-by: Mark Chappell <[email protected]>
adjust comment Co-authored-by: Mark Chappell <[email protected]>
adjust comment Co-authored-by: Mark Chappell <[email protected]>
adjust example Co-authored-by: Mark Chappell <[email protected]>
…ed-option.yml Co-authored-by: Mark Chappell <[email protected]>
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.
Assuming the tests pass, LGTM
Co-authored-by: Mark Chappell <[email protected]>
Thank you for your contribution. |
The add_docs script uses a new rst filename, which was missed in ansible-collections#116. So there's a bunch of duplicated docs files which should be cleaned up. This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@1a1be5f
The add_docs script uses a new rst filename, which was missed in ansible-collections#116. So there's a bunch of duplicated docs files which should be cleaned up. This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@1a1be5f
The add_docs script uses a new rst filename, which was missed in ansible-collections#116. So there's a bunch of duplicated docs files which should be cleaned up.
SUMMARY
Add "on_missing" and "on_denied" option for aws_secret lookup.
This option controls how to handle a not existing secret (ResourceNotFoundException) or missing access rights (AccessDeniedException). The option naming is based on the "config" lookup.
At some places we are using aws secrets optional when they are configured or the running user has access to it. With the generic lookup error control we can not differentiate between such state and a regular error.
ISSUE TYPE
COMPONENT NAME
aws_secret
ADDITIONAL INFORMATION
The option "on_missing" and "on_denied" can be set to:
playbook:
output: