-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to manage resource policy for AWS Secrets Manager secrets (…
…#843) Add ability to manage resource policy for AWS Secrets Manager secrets SUMMARY AWS Secrets Manager secrets support attaching resource policy. The benefit is huge when necessary to access secrets from other AWS accounts. This pull request adds ability to manage (add new/remove or modify existing) secrets resource policy. ISSUE TYPE Feature Pull Request COMPONENT NAME module: aws_secret ADDITIONAL INFORMATION Reviewed-by: Mark Woolley <[email protected]> Reviewed-by: Yuri Krysko <[email protected]> Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]>
- Loading branch information
Showing
4 changed files
with
136 additions
and
5 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
changelogs/fragments/843-add_aws_secret_resource_policy_support.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
minor_changes: | ||
- aws_secret - Add ``resource_policy`` parameter (https://github.com/ansible-collections/community.aws/pull/843). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/integration/targets/aws_secret/templates/secret-policy.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"Version" : "2012-10-17", | ||
"Statement" : [ { | ||
"Effect" : "Allow", | ||
"Principal" : { | ||
"AWS" : "arn:aws:iam::{{ aws_caller_info.account }}:root" | ||
}, | ||
"Action" : "secretsmanager:*", | ||
"Resource" : "*" | ||
} ] | ||
} |