forked from 18F/dns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdigitalgov.gov.tf
446 lines (385 loc) · 13.8 KB
/
digitalgov.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
# These DNS records are hosted out of Route53, and managed by Digital.gov and the Infrastructure team at Technology Transformation Services (TTS).
# More information on editing: https://github.com/18F/dns/blob/main/README.md
# To request a change, file an issue: https://github.com/18F/dns
# Question? email [email protected] or reach us in #digitalgov in Slack
# =================================
# For each record, please leave:
# - primary contact information
# - comments explaining what the record is used for, or where it redirects
# NOTE: digitalgov.gov is a legacy domain that is still hooked up to a number of services in TTS. See the Digital.gov file for more additional records https://github.com/18F/dns/blob/main/terraform/digital.gov.tf
# =================================
# INIT
resource "aws_route53_zone" "digitalgov_gov_zone" {
name = "digitalgov.gov."
tags = {
Project = "dns"
}
}
# =================================
# REDIRECTS
# Most of our redirects go through an app called pages_redirect, managed by the Federalist team
# To file a new redirect, create an issue at https://github.com/18F/pages-redirects
# digitalgov.gov
# Redirects to digital.gov through pages_redirect
resource "aws_route53_record" "digitalgov_gov_apex" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "digitalgov.gov."
type = "A"
alias {
name = "dj62070yqrr60.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "digitalgov_gov_apex_aaaa" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "digitalgov.gov."
type = "AAAA"
alias {
name = "dj62070yqrr60.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
# www.digitalgov.gov — redirects to digital.gov through pages_redirect
resource "aws_route53_record" "digitalgov_gov_www" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "www.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"d1rrea61xhwc36.cloudfront.net."
]
}
# OpenOpps
# openopps.digitalgov.gov — redirects to openopps.usajobs.gov through pages_redirect
resource "aws_route53_record" "digitalgov_gov_openopps_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "openopps.digitalgov.gov."
type = "A"
alias {
name = "d198punmzgrl9l.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "digitalgov_gov_openopps_digitalgov_gov_aaaa" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "openopps.digitalgov.gov."
type = "AAAA"
alias {
name = "d198punmzgrl9l.cloudfront.net."
zone_id = local.cloud_gov_cloudfront_zone_id
evaluate_target_health = false
}
}
# search.digitalgov.gov
resource "aws_route53_record" "search_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "search.digitalgov.gov."
type = "CNAME"
ttl = "600"
records = [
"dgsearchsite.infr.search.usa.gov."
]
}
# summit.digitalgov.gov — redirects to digital.gov through pages_redirect
resource "aws_route53_record" "summit_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "summit.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"d3quko6qtudpnl.cloudfront.net."
]
}
# find.digitalgov.gov
# redirects to digital.gov — though unclear where the redirect is happening
resource "aws_route53_record" "find_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "find.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"digitalgov.sites.infr.search.usa.gov."
]
}
# U.S. Digital Registry
# Redirects to cloud.gov External Domains using https://github.com/18f/pages-redirects
# Contact [email protected] regarding changes
# U.S. Digital Registry
# usdigitalregistry.digitalgov.gov
resource "aws_route53_record" "redirect_usdigitalregistry_digitalgov_gov" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "usdigitalregistry.digitalgov.gov."
type = "CNAME"
ttl = 300
records = ["usdigitalregistry.digitalgov.gov.external-domains-production.cloud.gov."]
}
# U.S. Digital Registry
# usdigitalregistry.digitalgov.gov ACME Challenge
resource "aws_route53_record" "acme_challenge_usdigitalregistry_digitalgov_gov" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "_acme-challenge.usdigitalregistry.digitalgov.gov."
type = "CNAME"
ttl = 300
records = ["_acme-challenge.usdigitalregistry.digitalgov.gov.external-domains-production.cloud.gov."]
}
# END REDIRECTS
# =================================
# SERVICES
# Digital Analytics Program (DAP) —
# dap.digitalgov.gov
# reach out to [email protected] before making any changes
resource "aws_route53_record" "dap_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "dap.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"d27f3qgc9anoq2.cloudfront.net."
]
}
# DAP Temporary record for validation
resource "aws_route53_record" "dap_validation_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "_c80f04313e7e2fadb177e34e2dedf0d6.dap.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"_3f7fd3397174324e46798283045cd3e7.acm-validations.aws"
]
}
# END SERVICES
# =================================
# EMAIL and SUPPORT SERVICES
# o166.email.digitalgov.gov — A
# Unclear what this is for.
resource "aws_route53_record" "o166_email_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "o166.email.digitalgov.gov."
type = "A"
ttl = "300"
records = [
"167.89.86.190"
]
}
# admin.digitalgov.gov — A
# Unclear what this is for.
resource "aws_route53_record" "admin_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "admin.digitalgov.gov."
type = "A"
ttl = "600"
records = [
"173.203.40.168"
]
}
# support.digitalgov.gov — A
# used a number of teams across TTS in conjunction with Zendesk
# - USWDS
# - Search.gov
# - DAP
resource "aws_route53_record" "support_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "support.digitalgov.gov."
type = "A"
ttl = "600"
records = [
"216.128.241.47",
"173.252.148.104",
]
}
# required for AWS SES to DKIM-sign emails sent "From" support.digitalgov.gov
resource "aws_route53_record" "support_digitalgov_gov_ses_dkim_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "4ixtpnvpubjuxqvnex727otq55y2ew7w._domainkey.support.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"4ixtpnvpubjuxqvnex727otq55y2ew7w.dkim.amazonses.com"
]
}
# required for AWS SES to DKIM-sign emails sent "From" support.digitalgov.gov
resource "aws_route53_record" "support_digitalgov_gov_ses_dkim_b" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "tmoxp5vgftwsmhkukt2z6ayvfj5bw7zo._domainkey.support.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"tmoxp5vgftwsmhkukt2z6ayvfj5bw7zo.dkim.amazonses.com"
]
}
# required for AWS SES to DKIM-sign emails sent "From" support.digitalgov.gov
resource "aws_route53_record" "support_digitalgov_gov_ses_dkim_c" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "5uiojtkg7z5grkldq7ajm3zamtzh3h2s._domainkey.support.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"5uiojtkg7z5grkldq7ajm3zamtzh3h2s.dkim.amazonses.com"
]
}
# required by AWS SES to verify control of the support.digitalgov.gov domain
resource "aws_route53_record" "support_digitalgov_gov_ses_verification" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "_amazonses.support.digitalgov.gov."
type = "TXT"
ttl = "3600"
records = [
"T5etn/YylzSUQQWw6HspyK4+2+B9XzE7Kajpz9ogfJI="
]
}
# support.digitalgov.gov - TXT
resource "aws_route53_record" "digitalgov_gov_support_digitalgov_gov_txt" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "support.digitalgov.gov."
type = "TXT"
ttl = "3600"
records = [
"v=spf1 mx a:spf.servicenowservices.com include:amazonses.com include:1962994.spf05.hubspotemail.net ~all"
]
}
# support.digitalgov.gov — MX
resource "aws_route53_record" "support_digitalgov_gov_mx" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "support.digitalgov.gov."
type = "MX"
ttl = "600"
records = [
"10 inbound-smtp.us-east-1.amazonaws.com."
]
}
# email.digitalgov.gov — MX
# unclear what this is for
resource "aws_route53_record" "email_digitalgov_gov_mx" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "email.digitalgov.gov."
type = "MX"
ttl = "3600"
records = [
"10 mx.sendgrid.net."
]
}
# email.digitalgov.gov - TXT
resource "aws_route53_record" "digitalgov_gov_email_digitalgov_gov_txt" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "email.digitalgov.gov."
type = "TXT"
ttl = "3600"
records = [
"v=spf1 ip4:167.89.86.190 -all"
]
}
# END EMAIL and SUPPORT SERVICES
# =================================
# EMAIL NEWSLETTER (HubSpot)
# connect.digitalgov.gov
# A former landing page for signing up for the HubSpot newsletter
# Needs to be removed and redirected to https://digital.gov
resource "aws_route53_record" "connect_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "connect.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"1962994g44.secure0082.hubspot.net."
]
}
# Hubspot records for sending email from the digitalgov.gov domain
# See https://knowledge.hubspot.com/email/can-i-use-a-dmarc-policy-with-hubspot#troubleshoot-issues-with-dmarc-authentication
resource "aws_route53_record" "hubspot1_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "hs1._domainkey.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"digitalgov-gov.hs01a.dkim.hubspotemail.net."
]
}
# Hubspot records for sending email from the digitalgov.gov domain
# See https://knowledge.hubspot.com/email/can-i-use-a-dmarc-policy-with-hubspot#troubleshoot-issues-with-dmarc-authentication
resource "aws_route53_record" "hubspot2_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "hs2._domainkey.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"digitalgov-gov.hs01b.dkim.hubspotemail.net."
]
}
# Hubspot records for sending email from the digitalgov.gov domain
# See https://knowledge.hubspot.com/email/can-i-use-a-dmarc-policy-with-hubspot#troubleshoot-issues-with-dmarc-authentication
resource "aws_route53_record" "hubspot3_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "hs1-1962994._domainkey.support.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"support-digitalgov-gov.hs11a.dkim.hubspotemail.net."
]
}
# Hubspot records for sending email from the digitalgov.gov domain
# See https://knowledge.hubspot.com/email/can-i-use-a-dmarc-policy-with-hubspot#troubleshoot-issues-with-dmarc-authentication
resource "aws_route53_record" "hubspot4_digitalgov_gov_a" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "hs2-1962994._domainkey.support.digitalgov.gov."
type = "CNAME"
ttl = "300"
records = [
"support-digitalgov-gov.hs11b.dkim.hubspotemail.net."
]
}
# OLD Hubspot TXT records for sending email from the digitalgov.gov domain
# Need to verify with Hubspot that this can be removed
# m1._domainkey.digitalgov.gov - TXT
resource "aws_route53_record" "digitalgov_gov_m1_domainkey_digitalgov_gov_txt" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "m1._domainkey.digitalgov.gov."
type = "TXT"
ttl = "300"
records = [
"k=rsa; t=s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4CvMOSVFOQDIJ+HkjdfAmKuBkkiqTwV982PCFBocVGHY07N2uvkleqT+XrySENYYzFrdnk2U1I7HUYkA0tpEZNzU7G67l7u1qWcd5QMBzVDsAg2vJf4fAkAWmdQCyWboeVXCoMnswz5LZK/t0+Z37smv9k2nDK3XNdsYTVu8D8wIDAQAB"
]
}
# NEW Hubspot TXT records for sending email from the digitalgov.gov domain
resource "aws_route53_record" "hubspot_digitalgov_gov_txt" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "smtpapi._domainkey.digitalgov.gov."
type = "TXT"
ttl = "300"
records = [
"k=rsa; t=s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPtW5iwpXVPiH5FzJ7Nrl8USzuY9zqqzjE0D1r04xDN6qwziDnmgcFNNfMewVKN2D1O+2J9N14hRprzByFwfQW76yojh54Xu3uSbQ3JP0A7k8o8GutRF8zbFUA8n0ZH2y0cIEjMliXY4W4LwPA7m4q0ObmvSjhd63O9d8z1XkUBwIDAQAB"
]
}
# END EMAIL NEWSLETTER (HubSpot)
# =================================
# TXT RECORDS
# Unclear what these are connected to, or if they are needed any more
# dzc.digitalgov.gov - TXT
resource "aws_route53_record" "digitalgov_gov_dzc_digitalgov_gov_txt" {
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
name = "dzc.digitalgov.gov."
type = "TXT"
ttl = "300"
records = [
"8wtx7v9M"
]
}
# END TXT RECORDS
# =================================
# BOD / SECURITY RECORDS (DMARC, SPF, etc...)
module "digitalgov_gov__email_security" {
source = "./email_security"
zone_id = aws_route53_zone.digitalgov_gov_zone.zone_id
txt_records = [
"google-site-verification=WRPUo6XC7m4X-8jJFvXPVs-W4uiqfEbF-pQYcD1-MOU",
local.spf_hubspot
]
}
# END BOD / SECURITY RECORDS (DMARC, SPF, etc...)
# =================================
# Output to Route53
output "digitalgov_gov_ns" {
value = aws_route53_zone.digitalgov_gov_zone.name_servers
}