diff --git a/main.tf b/main.tf index ea92766..7b068a4 100644 --- a/main.tf +++ b/main.tf @@ -239,7 +239,7 @@ data "archive_file" "main" { output_path = "source.zip" } -# DNS alias record +# DNS alias records resource "aws_route53_record" "main" { zone_id = "${var.zone_id}" name = "${var.domain_name}" @@ -251,3 +251,15 @@ resource "aws_route53_record" "main" { evaluate_target_health = false } } + +resource "aws_route53_record" "ipv6" { + zone_id = "${var.zone_id}" + name = "${var.domain_name}" + type = "AAAA" + + alias { + name = "${aws_cloudfront_distribution.main.domain_name}" + zone_id = "${aws_cloudfront_distribution.main.hosted_zone_id}" + evaluate_target_health = false + } +}