-
Notifications
You must be signed in to change notification settings - Fork 0
/
route53records.tf
44 lines (40 loc) · 1.28 KB
/
route53records.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
resource "aws_route53_record" "root_domain" {
zone_id = "${aws_route53_zone.dnszone.zone_id}"
name = "${var.site}"
type = "A"
alias {
name = "${aws_cloudfront_distribution.cloudfront.domain_name}"
zone_id = "${aws_cloudfront_distribution.cloudfront.hosted_zone_id}"
evaluate_target_health = false
}
}
resource "aws_route53_record" "root_domain_v6" {
zone_id = "${aws_route53_zone.dnszone.zone_id}"
name = "${var.site}"
type = "AAAA"
alias {
name = "${aws_cloudfront_distribution.cloudfront.domain_name}"
zone_id = "${aws_cloudfront_distribution.cloudfront.hosted_zone_id}"
evaluate_target_health = false
}
}
resource "aws_route53_record" "www_domain" {
zone_id = "${aws_route53_zone.dnszone.zone_id}"
name = "www.${var.site}"
type = "A"
alias {
name = "${aws_cloudfront_distribution.cloudfront.domain_name}"
zone_id = "${aws_cloudfront_distribution.cloudfront.hosted_zone_id}"
evaluate_target_health = false
}
}
resource "aws_route53_record" "www_domain_v6" {
zone_id = "${aws_route53_zone.dnszone.zone_id}"
name = "www.${var.site}"
type = "AAAA"
alias {
name = "${aws_cloudfront_distribution.cloudfront.domain_name}"
zone_id = "${aws_cloudfront_distribution.cloudfront.hosted_zone_id}"
evaluate_target_health = false
}
}