From 1b274170859b17cfa03890783aed740790628129 Mon Sep 17 00:00:00 2001 From: Angie Pinilla Date: Wed, 9 Feb 2022 10:15:04 -0500 Subject: [PATCH] tests/cloudfront: update to aws_s3_bucket_acl --- internal/service/cloudfront/distribution_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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) }