Skip to content

Commit

Permalink
Merge pull request #22614 from hashicorp/f-s3-bucket-deprecate-website
Browse files Browse the repository at this point in the history
r/s3_bucket: read-only `website`, `website_endpoint`, and `website_domain` arguments
  • Loading branch information
anGie44 authored Feb 4, 2022
2 parents 58cedda + 4a7f8e5 commit bb560f7
Show file tree
Hide file tree
Showing 12 changed files with 319 additions and 632 deletions.
2 changes: 2 additions & 0 deletions .changelog/22614.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```release-note:breaking-change
resource/aws_s3_bucket: The `website`, `website_domain`, and `website_endpoint` arguments have been deprecated and are now read-only. Use the `aws_s3_bucket_website_configuration` resource instead.
24 changes: 16 additions & 8 deletions internal/service/cloudformation/stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,15 @@ resource "aws_s3_bucket" "b" {
]
}
POLICY
}
website {
index_document = "index.html"
error_document = "error.html"
resource "aws_s3_website_configuration" "test" {
bucket = aws_s3_bucket.b.id
index_document {
suffix = "index.html"
}
error_document {
key = "error.html"
}
}
Expand Down Expand Up @@ -905,11 +909,15 @@ resource "aws_s3_bucket" "b" {
]
}
POLICY
}
website {
index_document = "index.html"
error_document = "error.html"
resource "aws_s3_bucket_website_configuration" "test" {
bucket = aws_s3_bucket.b.id
index_document {
suffix = "index.html"
}
error_document {
key = "error.html"
}
}
Expand Down
9 changes: 6 additions & 3 deletions internal/service/route53/record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1767,9 +1767,12 @@ resource "aws_route53_zone" "main" {
resource "aws_s3_bucket" "website" {
bucket = %[1]q
acl = "public-read"
}
website {
index_document = "index.html"
resource "aws_s3_bucket_website_configuration" "test" {
bucket = aws_s3_bucket.website.id
index_document {
suffix = "index.html"
}
}
Expand All @@ -1780,7 +1783,7 @@ resource "aws_route53_record" "alias" {
alias {
zone_id = aws_s3_bucket.website.hosted_zone_id
name = aws_s3_bucket.website.website_domain
name = aws_s3_bucket_website_configuration.test.website_domain
evaluate_target_health = true
}
}
Expand Down
Loading

0 comments on commit bb560f7

Please sign in to comment.