Skip to content

Commit ed32135

Browse files
committed
fix(s3-logging): relax PutObject resource ARN to allow CloudTrail logging
The previous ARN pattern with `AWSLogs/.../*` path was too restrictive and prevented the S3 bucket policy from accepting PutObject requests from CloudTrail. Changed to allow PutObject on any object within the logging bucket.
1 parent 6ce7bc8 commit ed32135

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

alb.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ resource "aws_alb" "ecs" {
1919
bucket = aws_s3_bucket.logging.id
2020
}
2121

22-
depends_on = [aws_s3_bucket_policy.logging, aws_s3_bucket.logging]
22+
depends_on = [
23+
aws_s3_bucket_policy.logging,
24+
aws_s3_bucket.logging,
25+
data.aws_iam_policy_document.s3_logging,
26+
aws_s3_bucket_server_side_encryption_configuration.logging
27+
]
2328
tags = local.tags
2429
}
2530

0 commit comments

Comments
 (0)