Skip to content

Commit cf4aafd

Browse files
antonbabenkobrandonjbjelland
authored andcommitted
Fixed S3 bucket policy to make it canonical
1 parent 5e7184c commit cf4aafd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "aws_alb" "main" {
2121

2222
data "aws_iam_policy_document" "bucket_policy" {
2323
statement {
24+
sid = "AllowToPutLoadBalancerLogsToS3Bucket"
25+
2426
actions = [
2527
"s3:PutObject",
2628
]
@@ -31,7 +33,7 @@ data "aws_iam_policy_document" "bucket_policy" {
3133

3234
principals {
3335
type = "AWS"
34-
identifiers = ["${data.aws_elb_service_account.main.id}"]
36+
identifiers = ["arn:aws:iam::${data.aws_elb_service_account.main.id}:root"]
3537
}
3638
}
3739
}

0 commit comments

Comments
 (0)