forked from ansible-collections/amazon.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws_config_delivery_channel - Add support for KMS encryption (ansible…
…-collections#1786) aws_config_delivery_channel - Add support for KMS encryption SUMMARY Add support for KMS keys when creating an AWS Config delivery channel ISSUE TYPE Feature Pull Request COMPONENT NAME aws_config_delivery_channel ADDITIONAL INFORMATION AWS added support for KMS encryption of objects stored in S3. This adds that option via a new kms_key_arn module option. Reviewed-by: Mark Chappell
- Loading branch information
Showing
5 changed files
with
129 additions
and
10 deletions.
There are no files selected for viewing
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,3 @@ | ||
--- | ||
minor_changes: | ||
- aws_config_delivery_channel - add support for encrypted objects in S3 via KMS key (https://github.com/ansible-collections/community.aws/pull/1786). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
config_s3_bucket: '{{ resource_prefix }}-config-records' | ||
config_kms_key: '{{ resource_prefix }}-kms' | ||
config_sns_name: '{{ resource_prefix }}-delivery-channel-test-topic' | ||
config_role_name: 'ansible-test-{{ resource_prefix }}' |
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
51 changes: 51 additions & 0 deletions
51
tests/integration/targets/config/templates/config-kms-policy.json.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,51 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "Enable IAM User Permissions", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": "arn:aws:iam::{{ aws_account_id }}:root" | ||
}, | ||
"Action": "kms:*", | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "Allow use of the key", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": [ | ||
"arn:aws:iam::{{ aws_account_id }}:role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig", | ||
] | ||
}, | ||
"Action": [ | ||
"kms:Encrypt", | ||
"kms:Decrypt", | ||
"kms:ReEncrypt*", | ||
"kms:GenerateDataKey*", | ||
"kms:DescribeKey" | ||
], | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "Allow attachment of persistent resources", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": [ | ||
"arn:aws:iam::{{ aws_account_id }}:role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig", | ||
] | ||
}, | ||
"Action": [ | ||
"kms:CreateGrant", | ||
"kms:ListGrants", | ||
"kms:RevokeGrant" | ||
], | ||
"Resource": "*", | ||
"Condition": { | ||
"Bool": { | ||
"kms:GrantIsForAWSResource": "true" | ||
} | ||
} | ||
} | ||
] | ||
} |