Explorar o código

Point to the ARN instead.

Sacha Ligthert %!s(int64=3) %!d(string=hai) anos
pai
achega
3c1f4c6325
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      terraform.tf

+ 3 - 3
terraform.tf

@@ -72,8 +72,8 @@ data "aws_iam_policy_document" "bucket_policy_document" {
     }
     actions = ["s3:GetObject"]
     resources = [
-      aws_s3_bucket.bucket.id,
-      "${aws_s3_bucket.bucket.id}/*",
+      aws_s3_bucket.bucket.arn,
+      "${aws_s3_bucket.bucket.arn}/*",
     ]
   }
 }
@@ -164,4 +164,4 @@ resource "aws_cloudfront_distribution" "s3_distribution" {
 
 #
 # CloudFront>
-#
+#