Skip to content

Commit

Permalink
Merge pull request #23068 from hashicorp/td-cloudfront-s3-bucket-acl-…
Browse files Browse the repository at this point in the history
…tests

tests/cloudfront: update to `aws_s3_bucket_acl`
  • Loading branch information
anGie44 authored Feb 9, 2022
2 parents ea7752f + 1b27417 commit e567778
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 e567778

Please sign in to comment.