-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroute53.tf
28 lines (24 loc) · 832 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
26
27
28
data "aws_route53_zone" "glenwinters_com" {
name = "glenwinters.com"
private_zone = false
}
resource "aws_route53_record" "website" {
zone_id = data.aws_route53_zone.glenwinters_com.zone_id
name = local.site_hostname
type = "A"
alias {
name = aws_cloudfront_distribution.website.domain_name
zone_id = aws_cloudfront_distribution.website.hosted_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "website_www" {
zone_id = data.aws_route53_zone.glenwinters_com.zone_id
name = "www.${local.site_hostname}"
type = "A"
alias {
name = aws_cloudfront_distribution.website.domain_name
zone_id = aws_cloudfront_distribution.website.hosted_zone_id
evaluate_target_health = false
}
}