forked from 18F/dns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
code.gov.tf
96 lines (80 loc) · 2.42 KB
/
code.gov.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
resource "aws_route53_zone" "code_toplevel" {
name = "code.gov"
tags = {
Project = "dns"
}
}
resource "aws_route53_record" "code_gov_apex" {
zone_id = aws_route53_zone.code_toplevel.zone_id
name = "code.gov."
type = "A"
alias {
name = "dqziuvpgrykcy.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "code_gov_apex_aaaa" {
zone_id = aws_route53_zone.code_toplevel.zone_id
name = "code.gov."
type = "AAAA"
alias {
name = "dqziuvpgrykcy.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "code_gov_www" {
zone_id = aws_route53_zone.code_toplevel.zone_id
name = "www.code.gov."
type = "A"
alias {
name = "dqziuvpgrykcy.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "code_gov_www_aaaa" {
zone_id = aws_route53_zone.code_toplevel.zone_id
name = "www.code.gov."
type = "AAAA"
alias {
name = "dqziuvpgrykcy.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "staging_code_gov_a" {
zone_id = aws_route53_zone.code_toplevel.zone_id
name = "staging.code.gov."
type = "A"
alias {
name = "d3g0jy911fqt1l.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "staging_code_gov_aaaa" {
zone_id = aws_route53_zone.code_toplevel.zone_id
name = "staging.code.gov."
type = "AAAA"
alias {
name = "d3g0jy911fqt1l.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "code_gov_api_cname" {
zone_id = aws_route53_zone.code_toplevel.zone_id
name = "api.code.gov."
type = "CNAME"
ttl = 300
records = ["api-code-gov.domains.api.data.gov"]
}
module "code_gov__email_security" {
source = "./email_security"
zone_id = aws_route53_zone.code_toplevel.zone_id
}
output "code_ns" {
value = aws_route53_zone.code_toplevel.name_servers
}