forked from futurice/terraform-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
route53.tf
25 lines (22 loc) · 836 Bytes
/
route53.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Add an IPv4 DNS record pointing to the API Gateway
resource "aws_route53_record" "ipv4" {
zone_id = "${data.aws_route53_zone.this.zone_id}"
name = "${var.api_domain}"
type = "A"
alias {
name = "${aws_api_gateway_domain_name.this.regional_domain_name}"
zone_id = "${aws_api_gateway_domain_name.this.regional_zone_id}"
evaluate_target_health = false
}
}
# Add an IPv6 DNS record pointing to the API Gateway
resource "aws_route53_record" "ipv6" {
zone_id = "${data.aws_route53_zone.this.zone_id}"
name = "${var.api_domain}"
type = "AAAA"
alias {
name = "${aws_api_gateway_domain_name.this.regional_domain_name}"
zone_id = "${aws_api_gateway_domain_name.this.regional_zone_id}"
evaluate_target_health = false
}
}