Debian Codegraph @

ansible_collections/amazon/aws/tests/integration/targets/cloudtrail/templates/kms-policy.j2

raw
1 {
2 "Version": "2012-10-17",
3 "Id": "CloudTrailPolicy",
4 "Statement": [
5 {
6 "Sid": "EncryptLogs",
7 "Effect": "Allow",
8 "Principal": { "Service": "cloudtrail.amazonaws.com" },
9 "Action": "kms:GenerateDataKey*",
10 "Resource": "*",
11 "Condition": {
12 "StringLike": {
13 "kms:EncryptionContext:aws:cloudtrail:arn": [
14 "arn:aws:cloudtrail:*:{{ aws_caller_info.account }}:trail/{{ resource_prefix }}*"
15 ]
16 }
17 }
18 },
19 {
20 "Sid": "DescribeKey",
21 "Effect": "Allow",
22 "Principal": { "Service": "cloudtrail.amazonaws.com" },
23 "Action": "kms:DescribeKey",
24 "Resource": "*"
25 },
26 {
27 "Sid": "AnsibleTestManage",
28 "Effect": "Allow",
29 "Principal": { "AWS": "{{ aws_caller_info.arn }}" },
30 "Action": "*",
31 "Resource": "*"
32 }
33 ]
34 }