diff --git a/iac/modules/app/content-bucket.tf b/iac/modules/app/content-bucket.tf index e4fdd0f..d633849 100644 --- a/iac/modules/app/content-bucket.tf +++ b/iac/modules/app/content-bucket.tf @@ -76,22 +76,22 @@ data "aws_iam_policy_document" "static_website" { type = "AWS" } - # condition { - # test = "StringLike" - # values = [random_string.cf_key.result] - # variable = "aws:Referer" - # } - } - statement { - sid = "2" - actions = ["s3:*"] - resources = ["${aws_s3_bucket.CdnContentBucket.arn}/*"] - - principals { - identifiers = ["*"] - type = "AWS" - } + condition { + test = "StringLike" + values = [random_string.cf_key.result] + variable = "aws:Referer" + } } +# statement { +# sid = "2" +# actions = ["s3:*"] +# resources = ["${aws_s3_bucket.CdnContentBucket.arn}/*"] +# +# principals { +# identifiers = ["*"] +# type = "AWS" +# } +# } } resource "aws_s3_bucket_public_access_block" "content_bucket" {