Skip to content
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: Handle pagination for bypath=true #591

Conversation

mandar242
Copy link
Contributor

@mandar242 mandar242 commented Dec 20, 2021

Depends-On: ansible/ansible-zuul-jobs#1359
Depends-On: ansible/ansible-zuul-jobs#1362
Depends-On: ansible/ansible-zuul-jobs#1364

SUMMARY

Currently aws_secret returns only 10 secrets, added manual pagination for getting all the secrets as per the task.

Fixes #472.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

aws_secret

@mandar242
Copy link
Contributor Author

Tested locally with

---
- name: secret lookup demo
  hosts: localhost
  tasks:
    - name: "Get secrets from AWS Secrets Manager"
      set_fact:
        secret_value: "{{ lookup('aws_secret', 'prod', bypath='true', region='us-east-2' )}}"

    - name: print secret value
      debug: msg="{{ secret_value }}"

@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul

This comment has been minimized.

@mandar242
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul

This comment has been minimized.

@mandar242
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul

This comment has been minimized.

@jillr
Copy link
Collaborator

jillr commented Jan 26, 2022

recheck

@softwarefactory-project-zuul

This comment has been minimized.

@mandar242
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul

This comment has been minimized.

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review has_issue lookup lookup plugin needs_triage plugins plugin (any type) tests tests labels Jan 27, 2022
@mandar242
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul

This comment has been minimized.

@goneri
Copy link
Member

goneri commented Jan 27, 2022

recheck

1 similar comment
@goneri
Copy link
Member

goneri commented Jan 27, 2022

recheck

@goneri goneri closed this Jan 27, 2022
@goneri goneri reopened this Jan 27, 2022
@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@mandar242
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@goneri
Copy link
Member

goneri commented Feb 23, 2022

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

Copy link
Collaborator

@alinabuzachis alinabuzachis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mandar242 Thank you. LGTM!

@goneri
Copy link
Member

goneri commented Feb 24, 2022

recheck

@softwarefactory-project-zuul
Copy link
Contributor

This change depends on a change that failed to merge.

@goneri
Copy link
Member

goneri commented Feb 24, 2022

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@jillr jillr added the mergeit Merge the PR (SoftwareFactory) label Feb 24, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@jillr jillr added the gate label Feb 24, 2022
@alinabuzachis alinabuzachis added backport-3 PR should be backported to the stable-3 branch mergeit Merge the PR (SoftwareFactory) and removed gate mergeit Merge the PR (SoftwareFactory) labels Feb 28, 2022
@alinabuzachis
Copy link
Collaborator

regate

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 9f0a616 into ansible-collections:main Mar 1, 2022
@patchback
Copy link

patchback bot commented Mar 1, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/9f0a616e84bd769358509bed6708dd88d7b36179/pr-591

Backported as #693

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Mar 1, 2022
aws_secret: Handle pagination for bypath=true

Depends-On: ansible/ansible-zuul-jobs#1359
Depends-On: ansible/ansible-zuul-jobs#1362
Depends-On: ansible/ansible-zuul-jobs#1364
SUMMARY

Currently aws_secret returns only 10 secrets, added manual pagination for getting all the secrets as per the task.
Fixes #472.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

aws_secret

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Joseph Torcasso <None>
(cherry picked from commit 9f0a616)
@mandar242 mandar242 deleted the 472_secret_lookup branch March 2, 2022 04:02
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Mar 2, 2022
[PR #591/9f0a616e backport][stable-3] aws_secret: Handle pagination for bypath=true

This is a backport of PR #591 as merged into main (9f0a616).
Depends-On: ansible/ansible-zuul-jobs#1359
Depends-On: ansible/ansible-zuul-jobs#1362
Depends-On: ansible/ansible-zuul-jobs#1364
SUMMARY

Currently aws_secret returns only 10 secrets, added manual pagination for getting all the secrets as per the task.
Fixes #472.
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

aws_secret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3 PR should be backported to the stable-3 branch bug This issue/PR relates to a bug community_review has_issue lookup lookup plugin mergeit Merge the PR (SoftwareFactory) plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

amazon.aws.aws_secret lookup with bypath=true returns only upto 10 values
7 participants