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

secretsmanager_secret: add 'overwrite' parameter #1628

Conversation

brsolomon-deloitte
Copy link
Contributor

SUMMARY

Adds an 'overwrite' parameter to secretsmanager_secret

- If set to True, an existing secret with the same name will be overwritten.
- If set to False, a secret with the given name will only be created if none exists.

Fixes #1626

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

secretsmanager_secret

ADDITIONAL INFORMATION

@github-actions
Copy link

github-actions bot commented Dec 21, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review feature This issue/PR relates to a feature request module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) labels Dec 21, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ ansible-galaxy-importer SUCCESS in 3m 59s
✔️ build-ansible-collection SUCCESS in 6m 01s
✔️ ansible-test-sanity-docker-devel SUCCESS in 11m 58s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 15s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 51s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 13s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 14s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 49s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 43s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 48s
ansible-test-changelog FAILURE in 2m 42s
✔️ ansible-test-splitter SUCCESS in 2m 52s
✔️ integration-community.aws-1 SUCCESS in 5m 56s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@tremble tremble force-pushed the feat/secretsmanager_secret-overwrite-param branch from 6ec6db2 to ceba264 Compare February 8, 2023 11:30
Adds an 'overwrite' parameter

    - If set to True, an existing secret with the same name will be overwritten.
    - If set to False, a secret with the given name will only be created if none exists.

Closes ansible-collections#1626
Signed-off-by: Brad Solomon <81818815+brsolomon-deloitte@users.noreply.github.com>
@tremble tremble force-pushed the feat/secretsmanager_secret-overwrite-param branch from 2a92f21 to 414e554 Compare February 8, 2023 11:47
@tremble tremble force-pushed the feat/secretsmanager_secret-overwrite-param branch 2 times, most recently from f9d729f to 9eab93a Compare February 8, 2023 11:59
@tremble tremble requested a review from markuman February 8, 2023 11:59
@tremble
Copy link
Contributor

tremble commented Feb 8, 2023

@brsolomon-deloitte Thanks for taking the time to submit this PR

I've rebased the PR, added some integration tests and a changelog fragment.

@markuman markuman added the backport-5 PR should be backported to the stable-5 branch label Feb 8, 2023
@ansibullbot ansibullbot added integration tests/integration tests tests and removed needs_triage labels Feb 8, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ ansible-galaxy-importer SUCCESS in 5m 19s
✔️ build-ansible-collection SUCCESS in 5m 55s
ansible-test-sanity-docker-devel FAILURE in 11m 43s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 11m 43s (non-voting)
ansible-test-sanity-docker-stable-2.12 FAILURE in 11m 43s
ansible-test-sanity-docker-stable-2.13 FAILURE in 11m 40s
ansible-test-sanity-docker-stable-2.14 FAILURE in 11m 51s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 02s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 51s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 8m 12s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 7m 46s
✔️ ansible-test-changelog SUCCESS in 2m 56s
✔️ ansible-test-splitter SUCCESS in 4m 31s
integration-community.aws-1 FAILURE in 5m 32s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@tremble tremble force-pushed the feat/secretsmanager_secret-overwrite-param branch from 9eab93a to ca18c50 Compare February 8, 2023 12:25
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 3m 56s
✔️ build-ansible-collection SUCCESS in 6m 02s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 03s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 32s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 52s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 27s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 12m 18s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 14s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 04s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 53s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 43s
✔️ ansible-test-changelog SUCCESS in 2m 19s
✔️ ansible-test-splitter SUCCESS in 2m 43s
✔️ integration-community.aws-1 SUCCESS in 6m 04s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Feb 8, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 4m 07s
✔️ build-ansible-collection SUCCESS in 6m 07s
✔️ ansible-test-sanity-docker-devel SUCCESS in 13m 06s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 03s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 18s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 29s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 03s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 56s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 37s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 06s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 24s
✔️ ansible-test-changelog SUCCESS in 2m 18s
✔️ ansible-test-splitter SUCCESS in 2m 37s
✔️ integration-community.aws-1 SUCCESS in 6m 18s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 4bfcb0c into ansible-collections:main Feb 8, 2023
@patchback
Copy link

patchback bot commented Feb 8, 2023

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/4bfcb0c8f1b7f57554fb5020193e284a73ace728/pr-1628

Backported as #1715

🤖 @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 Feb 8, 2023
secretsmanager_secret: add 'overwrite' parameter

SUMMARY
Adds an 'overwrite' parameter to secretsmanager_secret
- If set to True, an existing secret with the same name will be overwritten.
- If set to False, a secret with the given name will only be created if none exists.

Fixes #1626
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
secretsmanager_secret
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
Reviewed-by: Markus Bergholz <git@osuv.de>
(cherry picked from commit 4bfcb0c)
@brsolomon-deloitte
Copy link
Contributor Author

@brsolomon-deloitte Thanks for taking the time to submit this PR

I've rebased the PR, added some integration tests and a changelog fragment.

Thanks for rounding out the rest of the PR and getting it merged! This will be a valuable feature for us.

softwarefactory-project-zuul bot pushed a commit that referenced this pull request Feb 8, 2023
[PR #1628/4bfcb0c8 backport][stable-5] secretsmanager_secret: add 'overwrite' parameter

This is a backport of PR #1628 as merged into main (4bfcb0c).
SUMMARY
Adds an 'overwrite' parameter to secretsmanager_secret
- If set to True, an existing secret with the same name will be overwritten.
- If set to False, a secret with the given name will only be created if none exists.

Fixes #1626
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
secretsmanager_secret
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-5 PR should be backported to the stable-5 branch community_review feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

secretsmanager_secret module should not overwrite an existing Secret
4 participants