Add AAAA records for native ipv6 reach-ability
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
This commit is contained in:
parent
a220c1efce
commit
6fb3d3046b
|
@ -168,6 +168,18 @@ resource "aws_route53_record" "static" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "aws_route53_record" "static_ipv6" {
|
||||||
|
zone_id = data.aws_route53_zone.external.zone_id
|
||||||
|
name = "${local.domain}."
|
||||||
|
type = "AAAA"
|
||||||
|
|
||||||
|
alias {
|
||||||
|
name = aws_cloudfront_distribution.cdn.domain_name
|
||||||
|
zone_id = aws_cloudfront_distribution.cdn.hosted_zone_id
|
||||||
|
evaluate_target_health = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_route53_record" "static_redirect" {
|
resource "aws_route53_record" "static_redirect" {
|
||||||
count = var.enable_naked_domain ? 0 : 1
|
count = var.enable_naked_domain ? 0 : 1
|
||||||
|
|
||||||
|
@ -182,6 +194,20 @@ resource "aws_route53_record" "static_redirect" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "aws_route53_record" "static_redirect_ipv6" {
|
||||||
|
count = var.enable_naked_domain ? 0 : 1
|
||||||
|
|
||||||
|
zone_id = data.aws_route53_zone.external.zone_id
|
||||||
|
name = "${local.naked_domain}."
|
||||||
|
type = "AAAA"
|
||||||
|
|
||||||
|
alias {
|
||||||
|
name = aws_cloudfront_distribution.cdn_redirect[0].domain_name
|
||||||
|
zone_id = aws_cloudfront_distribution.cdn_redirect[0].hosted_zone_id
|
||||||
|
evaluate_target_health = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_s3_bucket_policy" "static_policy" {
|
resource "aws_s3_bucket_policy" "static_policy" {
|
||||||
bucket = aws_s3_bucket.static.id
|
bucket = aws_s3_bucket.static.id
|
||||||
policy = data.template_file.s3_origin_policy.rendered
|
policy = data.template_file.s3_origin_policy.rendered
|
||||||
|
@ -382,4 +408,3 @@ SCRIPT
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue