Skip to content

Commit

Permalink
tests/cloudfront: update to aws_s3_bucket_acl
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 committed Feb 9, 2022
1 parent 46bf549 commit 1b27417
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion internal/service/cloudfront/distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
}

Expand Down

0 comments on commit 1b27417

Please sign in to comment.