Skip to content

Commit bfc3875

Browse files
fix: Route53 Alias record so that it uses the correct S3 endpoint regardless of the region the bucket is created in
1 parent cbf0721 commit bfc3875

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "aws_route53_record" "domains" {
3838
type = "A"
3939

4040
alias {
41-
name = "s3-website.${aws_s3_bucket.route53_http_redirect_bucket.region}.amazonaws.com"
41+
name = aws_s3_bucket_website_configuration.route53_http_redirect_webconf.website_domain
4242
zone_id = aws_s3_bucket.route53_http_redirect_bucket.hosted_zone_id
4343
evaluate_target_health = true
4444
}

0 commit comments

Comments
 (0)