Debian Codegraph @

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

raw
1 {
2 "Version": "2012-10-17",
3 "Statement": [
4 {
5 "Sid": "CloudTrailCheckAcl",
6 "Effect": "Allow",
7 "Principal": { "Service": "cloudtrail.amazonaws.com" },
8 "Action": "s3:GetBucketAcl",
9 "Resource": "arn:aws:s3:::{{ bucket_name }}",
10 },
11 {
12 "Sid": "CloudTrailWriteLogs",
13 "Effect": "Allow",
14 "Principal": { "Service": "cloudtrail.amazonaws.com" },
15 "Action": "s3:PutObject",
16 "Resource": [
17 "arn:aws:s3:::{{ bucket_name }}/AWSLogs/{{ aws_caller_info.account }}/*",
18 "arn:aws:s3:::{{ bucket_name }}/{{ cloudtrail_prefix }}*/AWSLogs/{{ aws_caller_info.account }}/*"
19 ],
20 "Condition": {
21 "StringEquals": {
22 "s3:x-amz-acl": "bucket-owner-full-control"
23 }
24 }
25 },
26 {
27 "Sid": "AnsibleTestManage",
28 "Effect": "Allow",
29 "Principal": { "AWS": "{{ aws_caller_info.arn }}" },
30 "Action": "*",
31 "Resource": "arn:aws:s3:::{{ bucket_name }}"
32 }
33 ]
34 }