@cryptotaxi247 / infra / commits / eab30ea7

terraform: fix cache-log permissions

This is what AWS sets when configuring the log bucket.

zimbatm committed Nov 7, 2023 at 16:14 UTC eab30ea7bcc6564ace743a940cc1c5e30db9e302
1 file changed +15
terraform/cache_log.tf
+15
@@ -76,7 +76,22 @@ data "aws_iam_policy_document" "cache_log" {
76 resources = [
77 aws_s3_bucket.cache_log.arn,
78 ]
79 + }
80 +
81 + statement {
82 + sid = "S3PolicyStmt-DO-NOT-MODIFY-1699369618664"
83 + effect = "Allow"
84 +
85 + principals {
86 + type = "Service"
87 + identifiers = ["logging.s3.amazonaws.com"]
88 + }
89 +
90 + actions = ["s3:PutObject"]
91
92 + resources = [
93 + "${aws_s3_bucket.cache_log.arn}/*",
94 + ]
95 }
96 }
97