diff --git a/internal/service/cloudfront/distribution_test.go b/internal/service/cloudfront/distribution_test.go index 7dc7682c308..b648eedf1eb 100644 --- a/internal/service/cloudfront/distribution_test.go +++ b/internal/service/cloudfront/distribution_test.go @@ -1417,6 +1417,10 @@ func originBucket(rName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "s3_bucket_origin" { bucket = "%[1]s.origin-bucket" +} + +resource "aws_s3_bucket_acl" "s3_bucket_origin_acl" { + bucket = aws_s3_bucket.s3_bucket_origin.id acl = "public-read" } `, rName) @@ -1426,6 +1430,10 @@ func backupBucket(rName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "s3_backup_bucket_origin" { bucket = "%[1]s.backup-bucket" +} + +resource "aws_s3_bucket_acl" "s3_backup_bucket_origin_acl" { + bucket = aws_s3_bucket.s3_backup_bucket_origin.id acl = "public-read" } `, rName) @@ -1435,9 +1443,13 @@ func logBucket(rName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "s3_bucket_logs" { bucket = "%[1]s.log-bucket" - acl = "public-read" force_destroy = true } + +resource "aws_s3_bucket_acl" "s3_bucket_logs_acl" { + bucket = aws_s3_bucket.s3_bucket_logs.id + acl = "public-read" +} `, rName) }