Skip to content

Commit adb4efc

Browse files
authored
Fastly logs bucket policy to give the fastly-log-processor user access (#398)
1 parent 1261d18 commit adb4efc

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

terraform-iam/fastlylog/main.tf

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,16 @@ resource "aws_s3_bucket_policy" "logs" {
3131
"Sid": "AllowNixOSOrgRead",
3232
"Effect": "Allow",
3333
"Principal": {
34-
"AWS": "arn:aws:iam::008826681144:user/eelco.dolstra"
34+
"AWS": "arn:aws:iam::008826681144:user/fastly-log-processor"
3535
},
36-
"Action": "s3:GetObject",
37-
"Resource": "arn:aws:s3:::${aws_s3_bucket.logs.id}/*"
38-
},
39-
{
40-
"Sid": "AllowNixOSOrgList",
41-
"Effect": "Allow",
42-
"Principal": {
43-
"AWS": "arn:aws:iam::008826681144:user/eelco.dolstra"
44-
},
45-
"Action": "s3:ListBucket",
46-
"Resource": "arn:aws:s3:::${aws_s3_bucket.logs.id}"
36+
"Action": [
37+
"s3:GetObject",
38+
"s3:ListBucket"
39+
],
40+
"Resource": [
41+
"arn:aws:s3:::${aws_s3_bucket.logs.id}/*",
42+
"arn:aws:s3:::${aws_s3_bucket.logs.id}"
43+
]
4744
}
4845
]
4946
}

0 commit comments

Comments
 (0)