-
Notifications
You must be signed in to change notification settings - Fork 397
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
Add secret manager replication support #827
Add secret manager replication support #827
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.
yeah, boto3 says:
Converts an existing secret to a multi-Region secret and begins replication the secret to a list of new regions.
I think the kms key id must be exists in the region where it is replicated. So the origin kms key id from the source region will not work.
Furthermore, according to the boto3 doc, you can replicate a secret to more than one region.
I think a better parameter pattern will be
- name: some secret
aws_secret:
name: "{{ secret_name }}"
state: present
secret_type: 'string'
region: eu-central-1
kms_key_id: some_key_in_eu_central_1
secret: "{{ super_secret_string }}"
replica:
- region: us-west-1
kms_key_id: some_key_in_us_west_1
- region: eu-north-1
kms_key_id: some_key_in_eu_north_1
register: result
I like your suggestion. I will refactor to use the pattern you described. |
I've added the backport-3 label as long as 4.0.0 is not released |
Signed-off-by: Eric Millbrandt <[email protected]>
…eak existing stuff)
838523d
to
3a38adb
Compare
To try and get this moving again I've rebased and tweaked the tests. Because CI only supports us-east-1 at this time I've commented out the CI tests. However, I have tested these locally. |
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
@emillbrandt-ngt Many thanks for taking the time to submit this PR, I'm sorry it's taken so long to get this merged. |
No worries. Thanks for taking it! |
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #1685 🤖 @patchback |
Add secret manager replication support Signed-off-by: Eric Millbrandt [email protected] SUMMARY Add support for regional secret replication. The component now supports: Creating a secret with a regional replica Adding a region replica to a secret Removing a region replica from a secret ISSUE TYPE Feature Pull Request COMPONENT NAME aws_secret ADDITIONAL INFORMATION https://aws.amazon.com/about-aws/whats-new/2021/03/aws-secrets-manager-provides-support-to-replicate-secrets-in-aws-secrets-manager-to-multiple-aws-regions/ https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/secretsmanager.html Reviewed-by: Eric Millbrandt <[email protected]> Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Mark Chappell <None> Reviewed-by: Alina Buzachis <None> Reviewed-by: Mark Woolley <[email protected]> (cherry picked from commit c7c6800)
[PR #827/c7c68009 backport][stable-5] Add secret manager replication support This is a backport of PR #827 as merged into main (c7c6800). Signed-off-by: Eric Millbrandt [email protected] SUMMARY Add support for regional secret replication. The component now supports: Creating a secret with a regional replica Adding a region replica to a secret Removing a region replica from a secret ISSUE TYPE Feature Pull Request COMPONENT NAME aws_secret ADDITIONAL INFORMATION https://aws.amazon.com/about-aws/whats-new/2021/03/aws-secrets-manager-provides-support-to-replicate-secrets-in-aws-secrets-manager-to-multiple-aws-regions/ https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/secretsmanager.html Reviewed-by: Mark Chappell <None>
elb_classic_lb - Remove deprecated ec2_elb fact SUMMARY Remove previously deprecated ec2_elb fact from elb_classic_lb this only every returned the value 'info'. ISSUE TYPE Feature Pull Request COMPONENT NAME elb_classic_lb ADDITIONAL INFORMATION See also ansible-collections#552 and ansible-collections#377 for some of the history. Reviewed-by: Alina Buzachis <None>
Signed-off-by: Eric Millbrandt [email protected]
SUMMARY
Add support for regional secret replication. The component now supports:
ISSUE TYPE
COMPONENT NAME
aws_secret
ADDITIONAL INFORMATION
https://aws.amazon.com/about-aws/whats-new/2021/03/aws-secrets-manager-provides-support-to-replicate-secrets-in-aws-secrets-manager-to-multiple-aws-regions/
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/secretsmanager.html