-
Notifications
You must be signed in to change notification settings - Fork 348
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_secret lookup doesn't honor on_missing when using nested #1781
Labels
bug
This issue/PR relates to a bug
needs_info
This issue requires further information. Please answer any outstanding questions
Comments
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this issue
Oct 24, 2023
…nsible-collections#1773) (ansible-collections#1781) eks_nodegroup - fixing remote access and added to integration tests SUMMARY This was incorrectly merged directly into stable-5 rather than main. Fixes ansible-collections#1771 Handling remote_access configuration the right way that boto understands it. Also included it to integration tests. ISSUE TYPE Bugfix Pull Request COMPONENT NAME eks_nodegroup ADDITIONAL INFORMATION This is pulling ansible-collections#1773 from stable-5 into main Reviewed-by: Markus Bergholz Reviewed-by: Thomas Bruckmann Reviewed-by: Mark Chappell Reviewed-by: Markus Bergholz <[email protected]>
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Feb 14, 2024
…nd on_missing=warn (#1972) lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn SUMMARY Fixes #1781 The lookup was raising an error instead of a warning message ISSUE TYPE Bugfix Pull Request COMPONENT NAME lookup/secretsmanager_secret Reviewed-by: Mandar Kulkarni <[email protected]> Reviewed-by: Alina Buzachis
patchback bot
pushed a commit
that referenced
this issue
Feb 14, 2024
…nd on_missing=warn (#1972) lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn SUMMARY Fixes #1781 The lookup was raising an error instead of a warning message ISSUE TYPE Bugfix Pull Request COMPONENT NAME lookup/secretsmanager_secret Reviewed-by: Mandar Kulkarni <[email protected]> Reviewed-by: Alina Buzachis (cherry picked from commit 08e7d70)
patchback bot
pushed a commit
that referenced
this issue
Feb 14, 2024
…nd on_missing=warn (#1972) lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn SUMMARY Fixes #1781 The lookup was raising an error instead of a warning message ISSUE TYPE Bugfix Pull Request COMPONENT NAME lookup/secretsmanager_secret Reviewed-by: Mandar Kulkarni <[email protected]> Reviewed-by: Alina Buzachis (cherry picked from commit 08e7d70)
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Feb 28, 2024
…nd on_missing=warn (#1972) (#1975) [PR #1972/08e7d700 backport][stable-7] lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn This is a backport of PR #1972 as merged into main (08e7d70). SUMMARY Fixes #1781 The lookup was raising an error instead of a warning message ISSUE TYPE Bugfix Pull Request COMPONENT NAME lookup/secretsmanager_secret Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell
alinabuzachis
pushed a commit
to alinabuzachis/amazon.aws
that referenced
this issue
Mar 1, 2024
…nd on_missing=warn (ansible-collections#1972) lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn SUMMARY Fixes ansible-collections#1781 The lookup was raising an error instead of a warning message ISSUE TYPE Bugfix Pull Request COMPONENT NAME lookup/secretsmanager_secret Reviewed-by: Mandar Kulkarni <[email protected]> Reviewed-by: Alina Buzachis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
This issue/PR relates to a bug
needs_info
This issue requires further information. Please answer any outstanding questions
Summary
I am using multiple lookup calls to populate secret variables from a single AWS secret containing multiple (nested) secrets, however it seems that
on_missing
applies only to the aws secret itself while I was hoping to get the same behaviour only when the nested key is missing inside the aws secret.Issue Type
Bug Report
Component Name
amazon.aws.aws_secret
Ansible Version
Collection Versions
AWS SDK versions
Configuration
$ ansible-config dump --only-changed
OS / Environment
Ubuntu
Steps to Reproduce
Expected Results
Expecting just a warning if the secret exists but doesn't contain
identity_admin_password
Actual Results
fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while templating '{'sync_db_password': \"{{ lookup('amazon.aws.aws_secret', user_provided_project_name + '.sync_db_password', on_missing='warn', nested=true) }}\", 'identity_admin_password': \"{{ lookup('amazon.aws.aws_secret', user_provided_project_name + '.identity_admin_password', on_missing='warn', nested=true) }}\"}'. Error was a <class 'ansible.errors.AnsibleLookupError'>, original message: Successfully retrieved secret but there exists no key identity_admin_password in the secret"}
Code of Conduct
The text was updated successfully, but these errors were encountered: