archlinux.tf 33.6 KB
Newer Older
1
terraform {
2
  backend "pg" {
3
    schema_name = "terraform_remote_state_stage1"
4
  }
5
6
}

7
8
9
10
11
12
13
data "external" "vault_hetzner" {
  program = [
    "${path.module}/../misc/get_key.py", "misc/vault_hetzner.yml",
    "hetzner_cloud_api_key",
    "hetzner_dns_api_key",
    "--format", "json"
  ]
14
}
15

16
17
data "hcloud_image" "archlinux" {
  with_selector = "custom_image=archlinux"
18
19
  most_recent   = true
  with_status   = ["available"]
20
21
22
}

provider "hcloud" {
23
24
25
26
27
28
29
30
31
  token = data.external.vault_hetzner.result.hetzner_cloud_api_key
}

provider "hetznerdns" {
  apitoken = data.external.vault_hetzner.result.hetzner_dns_api_key
}

resource "hetznerdns_zone" "archlinux" {
  name = "archlinux.org"
32
  ttl  = 86400
33
34
35
36
}

resource "hetznerdns_zone" "pkgbuild" {
  name = "pkgbuild.com"
37
  ttl  = 86400
38
39
40
41
}

resource "hetznerdns_record" "pkgbuild_com_origin_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
42
43
44
  name    = "@"
  value   = "78.46.178.133"
  type    = "A"
45
46
47
48
}

resource "hetznerdns_record" "pkgbuild_com_origin_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
49
50
51
  name    = "@"
  value   = "2a01:4f8:c2c:51e2::1"
  type    = "AAAA"
52
53
54
55
}

resource "hetznerdns_record" "pkgbuild_com_origin_caa" {
  zone_id = hetznerdns_zone.pkgbuild.id
56
57
58
  name    = "@"
  value   = "0 issue \"letsencrypt.org\""
  type    = "CAA"
59
60
61
62
}

resource "hetznerdns_record" "pkgbuild_com_origin_mx" {
  zone_id = hetznerdns_zone.pkgbuild.id
63
64
65
  name    = "@"
  value   = "0 ."
  type    = "MX"
66
67
68
69
}

resource "hetznerdns_record" "pkgbuild_com_origin_ns3" {
  zone_id = hetznerdns_zone.pkgbuild.id
70
71
72
  name    = "@"
  value   = "robotns3.second-ns.com."
  type    = "NS"
73
74
75
76
}

resource "hetznerdns_record" "pkgbuild_com_origin_ns2" {
  zone_id = hetznerdns_zone.pkgbuild.id
77
78
79
  name    = "@"
  value   = "robotns2.second-ns.de."
  type    = "NS"
80
81
82
83
}

resource "hetznerdns_record" "pkgbuild_com_origin_ns1" {
  zone_id = hetznerdns_zone.pkgbuild.id
84
85
86
  name    = "@"
  value   = "ns1.first-ns.de."
  type    = "NS"
87
88
}

89
90
91
92
93
94
95
96
97
# TODO: Commented currently as we have no idea how to handle SOA stuff with Terraform:
# https://github.com/timohirt/terraform-provider-hetznerdns/issues/20
# https://gitlab.archlinux.org/archlinux/infrastructure/-/merge_requests/62#note_4040
# resource "hetznerdns_record" "pkgbuild_com_origin_soa" {
#   zone_id = hetznerdns_zone.pkgbuild.id
#   name = "@"
#   value = "ns1.first-ns.de. dns.hetzner.com. 2020090604 14400 1800 604800 86400"
#   type = "SOA"
# }
98
99
100

resource "hetznerdns_record" "pkgbuild_com_origin_txt" {
  zone_id = hetznerdns_zone.pkgbuild.id
101
102
103
  name    = "@"
  value   = "\"v=spf1 -all\""
  type    = "TXT"
104
105
106
107
}

resource "hetznerdns_record" "pkgbuild_com_wildcard_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
108
109
110
  name    = "*"
  value   = "78.46.178.133"
  type    = "A"
111
112
113
114
}

resource "hetznerdns_record" "pkgbuild_com_wildcard_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
115
116
117
  name    = "*"
  value   = "2a01:4f8:c2c:51e2::1"
  type    = "AAAA"
118
119
120
121
}

resource "hetznerdns_record" "pkgbuild_com_mirror_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
122
123
124
  name    = "mirror"
  value   = "78.46.209.220"
  type    = "A"
125
126
127
128
}

resource "hetznerdns_record" "pkgbuild_com_mirror_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
129
130
131
  name    = "mirror"
  value   = "2a01:4f8:c2c:c62f::1"
  type    = "AAAA"
132
133
134
135
}

resource "hetznerdns_record" "pkgbuild_com_repro3_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
136
137
138
  name    = "repro3"
  value   = "147.75.81.79"
  type    = "A"
139
140
141
142
}

resource "hetznerdns_record" "pkgbuild_com_repro3_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
143
144
145
  name    = "repro3"
  value   = "2604:1380:2001:4500::1"
  type    = "AAAA"
146
147
148
149
}

resource "hetznerdns_record" "pkgbuild_com_www_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
150
151
152
  name    = "www"
  value   = "78.46.178.133"
  type    = "A"
153
154
155
156
}

resource "hetznerdns_record" "pkgbuild_com_www_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
157
158
159
  name    = "www"
  value   = "2a01:4f8:c2c:51e2::1"
  type    = "AAAA"
160
161
162
163
}

resource "hetznerdns_record" "archlinux_org_origin_a" {
  zone_id = hetznerdns_zone.archlinux.id
164
165
166
  name    = "@"
  value   = "138.201.81.199"
  type    = "A"
167
168
169
170
}

resource "hetznerdns_record" "archlinux_org_origin_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
171
172
173
  name    = "@"
  value   = "2a01:4f8:172:1d86::1"
  type    = "AAAA"
174
175
176
177
}

resource "hetznerdns_record" "archlinux_org_origin_caa" {
  zone_id = hetznerdns_zone.archlinux.id
178
179
180
  name    = "@"
  value   = "0 issue \"letsencrypt.org\""
  type    = "CAA"
181
182
183
184
}

resource "hetznerdns_record" "archlinux_org_origin_mx" {
  zone_id = hetznerdns_zone.archlinux.id
185
  name    = "@"
186
  ttl     = 600
Frederik Schwan's avatar
Frederik Schwan committed
187
  value   = "10 mail"
188
  type    = "MX"
189
190
191
192
}

resource "hetznerdns_record" "archlinux_org_origin_ns3" {
  zone_id = hetznerdns_zone.archlinux.id
193
194
195
  name    = "@"
  value   = "robotns3.second-ns.com."
  type    = "NS"
196
197
198
199
}

resource "hetznerdns_record" "archlinux_org_origin_ns2" {
  zone_id = hetznerdns_zone.archlinux.id
200
201
202
  name    = "@"
  value   = "robotns2.second-ns.de."
  type    = "NS"
203
204
205
206
}

resource "hetznerdns_record" "archlinux_org_origin_ns1" {
  zone_id = hetznerdns_zone.archlinux.id
207
208
209
  name    = "@"
  value   = "ns1.first-ns.de."
  type    = "NS"
210
211
}

212
213
214
215
216
217
218
219
220
# TODO: Commented currently as we have no idea how to handle SOA stuff with Terraform:
# https://github.com/timohirt/terraform-provider-hetznerdns/issues/20
# https://gitlab.archlinux.org/archlinux/infrastructure/-/merge_requests/62#note_4040
#; resource "hetznerdns_record" "archlinux_org_origin_soa" {
#   zone_id = hetznerdns_zone.archlinux.id
#   name = "@"
#   value = "ns1.first-ns.de. ibiru.archlinux.org. 2020072502 7200 900 1209600 86400"
#   type = "SOA"
# }
221
222
223

resource "hetznerdns_record" "archlinux_org_origin_txt" {
  zone_id = hetznerdns_zone.archlinux.id
224
  name    = "@"
225
  ttl     = 600
226
  value   = "\"v=spf1 ip4:66.211.214.132/28 ip4:5.9.250.164 ip6:2a01:4f8:160:3033::2 ip4:138.201.81.199/32 ip4:88.198.91.70/32 ip4:95.216.189.61 ip6:2a01:4f9:c010:3052::1 a:aur.archlinux.org a:apollo.archlinux.org ~all\""
227
  type    = "TXT"
228
229
230
231
}

resource "hetznerdns_record" "archlinux_org_origin_apollo_domainkey_txt" {
  zone_id = hetznerdns_zone.archlinux.id
232
  name    = "apollo._domainkey"
233
  ttl     = 600
234
235
  value   = "\"v=DKIM1; k=rsa; s=email; \" \"p=MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvZIf8SbjC53RDCbMjTEpo0FCuMSShlKWdwWjY1J+RpT3CL/21z4nXqVBYF1orkUScH8Nlabocraqk8lmpNBlKCUV77lk9mRsLkWhg+XjhvQXL1xfH8zAg1CntEZuaIMLUQ+5Gkw6BlO1qDRkmXS9UtV8Jt1rhjRtSrgN5lhztOCbQLRAtzKty/nMeClqsfT3nL2hbDeh+b/rYc\" \"l2veZAqiGcR2/0bnKlt+Nb5lOBY3oZiYLmZ5g+l9UXVjGUq9jGAooIWpQvuRPmin3RX31kXfr1A+mDBEexiOL1dDST2Zx7i9puXbqYH0u0IxBpweHCO5UqWx52mdXBuhs+DCo/JoZAHU/6eRzK+Sps50LgLFSzJJNfGXk5PUKdww2GHbkK3mCYfoFCpB0SADzl42+1w6YZk1yXoPdOHtChfQpCgjtddf1W8Q09pYO1/bn4l0erdFQsWb1K\" \"4wEVOCn+hHWbV42V+J3TyGxQ4AM8KQ1OPvUEabyTyqcO4evBaH7/S2wA91Z9QDjTbKmlNovs5zoxuOM/mPGPUuQMvhjoAP+rg4AwJ3Xwd3GgUcqQflcokayUYdp7F3aKp1NWAR9ibseU/XBYsSF8Ucjqzf4DJFUfrgjHUr97st7g4HUCyXrQO4tyE0ytiX8OFjjIszWLmF+B7Vup9O7k+dNz2Vj2Vyzkq1UCAwEAAQ==\""
  type    = "TXT"
236
237
238
239
}

resource "hetznerdns_record" "archlinux_org_accounts_a" {
  zone_id = hetznerdns_zone.archlinux.id
240
241
242
  name    = "accounts"
  value   = hcloud_server.accounts.ipv4_address
  type    = "A"
243
244
245
246
}

resource "hetznerdns_record" "archlinux_org_accounts_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
247
248
249
  name    = "accounts"
  value   = hcloud_server.accounts.ipv6_address
  type    = "AAAA"
250
251
252
253
}

resource "hetznerdns_record" "archlinux_org_apollo_a" {
  zone_id = hetznerdns_zone.archlinux.id
254
  name    = "apollo"
255
  ttl     = 600
256
257
  value   = "138.201.81.199"
  type    = "A"
258
259
260
261
}

resource "hetznerdns_record" "archlinux_org_apollo_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
262
  name    = "apollo"
263
  ttl     = 600
264
265
  value   = "2a01:4f8:172:1d86::1"
  type    = "AAAA"
266
267
268
269
}

resource "hetznerdns_record" "archlinux_org_archive_gemini_a" {
  zone_id = hetznerdns_zone.archlinux.id
270
271
272
  name    = "archive.gemini"
  value   = "49.12.124.107"
  type    = "A"
273
274
275
276
}

resource "hetznerdns_record" "archlinux_org_aur_a" {
  zone_id = hetznerdns_zone.archlinux.id
277
278
279
  name    = "aur"
  value   = hcloud_server.aur.ipv4_address
  type    = "A"
280
281
282
283
}

resource "hetznerdns_record" "archlinux_org_aur_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
284
285
286
  name    = "aur"
  value   = hcloud_server.aur.ipv6_address
  type    = "AAAA"
287
288
289
290
}

resource "hetznerdns_record" "archlinux_org_aur_mx" {
  zone_id = hetznerdns_zone.archlinux.id
291
  name    = "aur"
292
  ttl     = 600
293
294
  value   = "10 mx"
  type    = "MX"
295
296
297
298
}

resource "hetznerdns_record" "archlinux_org_aur_txt" {
  zone_id = hetznerdns_zone.archlinux.id
299
  name    = "aur"
300
  ttl     = 600
301
302
  value   = "\"v=spf1 a ?all\""
  type    = "TXT"
303
304
305
306
}

resource "hetznerdns_record" "archlinux_org_aur_dev_a" {
  zone_id = hetznerdns_zone.archlinux.id
307
308
309
  name    = "aur-dev"
  value   = hcloud_server.aur-dev.ipv4_address
  type    = "A"
310
311
312
313
}

resource "hetznerdns_record" "archlinux_org_aur_dev_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
314
315
316
  name    = "aur-dev"
  value   = hcloud_server.aur-dev.ipv6_address
  type    = "AAAA"
317
318
319
320
}

resource "hetznerdns_record" "archlinux_org_aur4_a" {
  zone_id = hetznerdns_zone.archlinux.id
321
322
323
  name    = "aur4"
  value   = "5.9.250.164"
  type    = "A"
324
325
326
327
}

resource "hetznerdns_record" "archlinux_org_aur4_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
328
329
330
  name    = "aur4"
  value   = "2a01:4f8:160:3033::2"
  type    = "AAAA"
331
332
333
334
}

resource "hetznerdns_record" "archlinux_org_bbs_a" {
  zone_id = hetznerdns_zone.archlinux.id
335
336
337
  name    = "bbs"
  value   = hcloud_server.bbs.ipv4_address
  type    = "A"
338
339
340
341
}

resource "hetznerdns_record" "archlinux_org_bbs_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
342
343
344
  name    = "bbs"
  value   = hcloud_server.bbs.ipv6_address
  type    = "AAAA"
345
346
347
348
}

resource "hetznerdns_record" "archlinux_org_bugs_a" {
  zone_id = hetznerdns_zone.archlinux.id
349
350
351
  name    = "bugs"
  value   = hcloud_server.bugs.ipv4_address
  type    = "A"
352
353
354
355
}

resource "hetznerdns_record" "archlinux_org_bugs_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
356
357
358
  name    = "bugs"
  value   = hcloud_server.bugs.ipv6_address
  type    = "AAAA"
359
360
361
362
}

resource "hetznerdns_record" "archlinux_org_dragon_a" {
  zone_id = hetznerdns_zone.archlinux.id
363
364
365
  name    = "dragon"
  value   = "195.201.167.210"
  type    = "A"
366
367
368
369
}

resource "hetznerdns_record" "archlinux_org_dragon_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
370
371
372
  name    = "dragon"
  value   = "2a01:4f8:13a:102a::2"
  type    = "AAAA"
373
374
375
376
}

resource "hetznerdns_record" "archlinux_org_gemini_a" {
  zone_id = hetznerdns_zone.archlinux.id
377
378
379
  name    = "gemini"
  value   = "49.12.124.107"
  type    = "A"
380
381
382
383
}

resource "hetznerdns_record" "archlinux_org_gemini_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
384
385
386
  name    = "gemini"
  value   = "2a01:4f8:242:5614::2"
  type    = "AAAA"
387
388
389
390
}

resource "hetznerdns_record" "archlinux_org_gitlab_a" {
  zone_id = hetznerdns_zone.archlinux.id
391
392
393
  name    = "gitlab"
  value   = hcloud_server.gitlab.ipv4_address
  type    = "A"
394
395
396
397
}

resource "hetznerdns_record" "archlinux_org_gitlab_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
398
399
400
  name    = "gitlab"
  value   = hcloud_server.gitlab.ipv6_address
  type    = "AAAA"
401
402
403
404
}

resource "hetznerdns_record" "archlinux_org_homedir_a" {
  zone_id = hetznerdns_zone.archlinux.id
405
406
407
  name    = "homedir"
  value   = hcloud_server.homedir.ipv4_address
  type    = "A"
408
409
410
411
}

resource "hetznerdns_record" "archlinux_org_homedir_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
412
413
414
  name    = "homedir"
  value   = hcloud_server.homedir.ipv6_address
  type    = "AAAA"
415
416
417
418
}

resource "hetznerdns_record" "archlinux_org_lists_a" {
  zone_id = hetznerdns_zone.archlinux.id
419
420
421
  name    = "lists"
  value   = "5.9.250.164"
  type    = "A"
422
423
424
425
}

resource "hetznerdns_record" "archlinux_org_lists_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
426
427
428
  name    = "lists"
  value   = "2a01:4f8:160:3033::2"
  type    = "AAAA"
429
430
431
432
}

resource "hetznerdns_record" "archlinux_org_lists_mx" {
  zone_id = hetznerdns_zone.archlinux.id
433
  name    = "lists"
434
  ttl     = 600
435
436
  value   = "10 luna"
  type    = "MX"
437
438
439
440
}

resource "hetznerdns_record" "archlinux_org_luna_a" {
  zone_id = hetznerdns_zone.archlinux.id
441
  name    = "luna"
442
  ttl     = 600
443
444
  value   = "5.9.250.164"
  type    = "A"
445
446
447
448
}

resource "hetznerdns_record" "archlinux_org_luna_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
449
  name    = "luna"
450
  ttl     = 600
451
452
  value   = "2a01:4f8:160:3033::2"
  type    = "AAAA"
453
454
455
456
}

resource "hetznerdns_record" "archlinux_org_luna_txt" {
  zone_id = hetznerdns_zone.archlinux.id
457
  name    = "luna._domainkey"
458
  ttl     = 600
459
460
  value   = "\"v=DKIM1; k=rsa; s=email; \" \"p=MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvXrAPvtdX8Jrk4zmyk8w9T2zdAJGe7z0+4XHWWiuzH8Zse6S7oXiS9CVaPOsu0TZqHqhuclASU7qh0NXFwWyi2xRPyJOqH2Clu7vHS3j5F4TjURFOp4/EbA0iQu4rbItl4AU11z2pGSEj5SykUsrH+jjdqzNqAG9d4lNvkTs6RRzPF3KhhY+XljaeysEyDSS4ap4E0DYcduSIX\" \"oD1exFv4SEbXThD9PC1u81w4xusnmwmfHtR7aazeqPDP+S+FqDRy2woCaQb/VMbqMYVuWTVKJ2RxFyTKredOOV2c5kzih7GViwoetll/rTqO4aVbeir9K4f6YZg85dSQtVwEat7LV+zBnQwp3ivWkrIk8VEdSsCSaJlgattBiPHsfFFv1xw4qi3h+UvfCGgz35dtlnzd/noGhNARg0Z+kaMSTjy75V1mKx5sCH0o8nAX2XU8akJfLz58Vg\" \"kTx/sfealtwNA0gTy1t1jV8q0OF5RA0IeMRgCzeH2USOZI98W+EAUsGG5653Vzmp3FJRWp1tWJwRJ0M/aZ3ka/G1iTx3rNNcadVk+4q3gz3KnlAlun+m58y8pNWKjYuxmu9xkDRwM/33rv98j0R8HZO7HFL+1vjKkxSEuzmnTQ2O9F76/OsQoDPZ1Z6nJRvK8ts8PQr4ASKohby62+1F1M8U2Xn7u84dYLUCAwEAAQ==\""
  type    = "TXT"
461
462
463
464
}

resource "hetznerdns_record" "archlinux_org_luna2_txt" {
  zone_id = hetznerdns_zone.archlinux.id
465
  name    = "luna2._domainkey"
466
  ttl     = 600
467
468
  value   = "\"v=DKIM1; k=rsa; s=email; \" \"p=MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvXrAPvtdX8Jrk4zmyk8w9T2zdAJGe7z0+4XHWWiuzH8Zse6S7oXiS9CVaPOsu0TZqHqhuclASU7qh0NXFwWyi2xRPyJOqH2Clu7vHS3j5F4TjURFOp4/EbA0iQu4rbItl4AU11z2pGSEj5SykUsrH+jjdqzNqAG9d4lNvkTs6RRzPF3KhhY+XljaeysEyDSS4ap4E0DYcduSIX\" \"oD1exFv4SEbXThD9PC1u81w4xusnmwmfHtR7aazeqPDP+S+FqDRy2woCaQb/VMbqMYVuWTVKJ2RxFyTKredOOV2c5kzih7GViwoetll/rTqO4aVbeir9K4f6YZg85dSQtVwEat7LV+zBnQwp3ivWkrIk8VEdSsCSaJlgattBiPHsfFFv1xw4qi3h+UvfCGgz35dtlnzd/noGhNARg0Z+kaMSTjy75V1mKx5sCH0o8nAX2XU8akJfLz58Vg\" \"kTx/sfealtwNA0gTy1t1jV8q0OF5RA0IeMRgCzeH2USOZI98W+EAUsGG5653Vzmp3FJRWp1tWJwRJ0M/aZ3ka/G1iTx3rNNcadVk+4q3gz3KnlAlun+m58y8pNWKjYuxmu9xkDRwM/33rv98j0R8HZO7HFL+1vjKkxSEuzmnTQ2O9F76/OsQoDPZ1Z6nJRvK8ts8PQr4ASKohby62+1F1M8U2Xn7u84dYLUCAwEAAQ==\""
  type    = "TXT"
469
470
471
472
}

resource "hetznerdns_record" "archlinux_org_mailman3_a" {
  zone_id = hetznerdns_zone.archlinux.id
473
474
475
  name    = "mailman3"
  value   = hcloud_server.mailman3.ipv4_address
  type    = "A"
476
477
478
479
}

resource "hetznerdns_record" "archlinux_org_master_key_a" {
  zone_id = hetznerdns_zone.archlinux.id
480
481
482
  name    = "master-key"
  value   = "138.201.81.199"
  type    = "A"
483
484
485
486
}

resource "hetznerdns_record" "archlinux_org_master_key_mx" {
  zone_id = hetznerdns_zone.archlinux.id
487
  name    = "master-key"
488
  ttl     = 600
489
490
  value   = "10 mx"
  type    = "MX"
491
492
493
494
}

resource "hetznerdns_record" "archlinux_org_matrix_a" {
  zone_id = hetznerdns_zone.archlinux.id
495
496
497
  name    = "matrix"
  value   = hcloud_server.matrix.ipv4_address
  type    = "A"
498
499
500
501
}

resource "hetznerdns_record" "archlinux_org_monitoring_a" {
  zone_id = hetznerdns_zone.archlinux.id
502
503
504
  name    = "monitoring"
  value   = hcloud_server.monitoring.ipv4_address
  type    = "A"
505
506
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
507
508
resource "hetznerdns_record" "archlinux_org_monitoring_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
509
510
511
  name    = "monitoring"
  value   = hcloud_server.monitoring.ipv6_address
  type    = "AAAA"
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
512
513
}

514
515
resource "hetznerdns_record" "archlinux_org_mx_a" {
  zone_id = hetznerdns_zone.archlinux.id
516
  name    = "mail"
517
  ttl     = 600
518
  value   = "95.216.189.61"
519
  type    = "A"
520
521
522
523
}

resource "hetznerdns_record" "archlinux_org_mx_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
524
  name    = "mail"
525
  ttl     = 600
526
  value   = "2a01:4f9:c010:3052::1"
527
  type    = "AAAA"
528
529
}

530
531
532
533
534
535
536
537
538
539
540
541
542
543
resource "hetznerdns_record" "archlinux_org_openpgpkey_a" {
  zone_id = hetznerdns_zone.archlinux.id
  name    = "openpgpkey"
  value   = hcloud_server.openpgpkey.ipv4_address
  type    = "A"
}

resource "hetznerdns_record" "archlinux_org_openpgpkey_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
  name    = "openpgpkey"
  value   = hcloud_server.openpgpkey.ipv6_address
  type    = "AAAA"
}

544
545
resource "hetznerdns_record" "archlinux_org_phrik_a" {
  zone_id = hetznerdns_zone.archlinux.id
546
547
548
  name    = "phrik"
  value   = hcloud_server.phrik.ipv4_address
  type    = "A"
549
550
551
552
}

resource "hetznerdns_record" "archlinux_org_quassel_a" {
  zone_id = hetznerdns_zone.archlinux.id
553
554
555
  name    = "quassel"
  value   = hcloud_server.quassel.ipv4_address
  type    = "A"
556
557
558
559
}

resource "hetznerdns_record" "archlinux_org_quassel_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
560
561
562
  name    = "quassel"
  value   = hcloud_server.quassel.ipv6_address
  type    = "AAAA"
563
564
565
566
}

resource "hetznerdns_record" "archlinux_org_reproducible_a" {
  zone_id = hetznerdns_zone.archlinux.id
567
568
569
  name    = "reproducible"
  value   = hcloud_server.reproducible.ipv4_address
  type    = "A"
570
571
572
573
}

resource "hetznerdns_record" "archlinux_org_runner2_a" {
  zone_id = hetznerdns_zone.archlinux.id
574
575
576
  name    = "runner2"
  value   = "147.75.80.217"
  type    = "A"
577
578
579
580
}

resource "hetznerdns_record" "archlinux_org_runner2_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
581
582
583
  name    = "runner2"
  value   = "2604:1380:2001:4500::3"
  type    = "AAAA"
584
585
586
587
}

resource "hetznerdns_record" "archlinux_org_secure_runner1_a" {
  zone_id = hetznerdns_zone.archlinux.id
588
589
590
  name    = "secure-runner1"
  value   = "116.202.134.150"
  type    = "A"
591
592
593
594
}

resource "hetznerdns_record" "archlinux_org_secure_runner1_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
595
596
597
  name    = "secure-runner1"
  value   = "2a01:4f8:231:4e1e::2"
  type    = "AAAA"
598
599
}

600
601
resource "hetznerdns_record" "archlinux_org_svn2gittest_a" {
  zone_id = hetznerdns_zone.archlinux.id
602
603
604
  name    = "svn2gittest"
  value   = hcloud_server.svn2gittest.ipv4_address
  type    = "A"
605
606
607
608
}

resource "hetznerdns_record" "archlinux_org_svn2gittest_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
609
610
611
  name    = "svn2gittest"
  value   = hcloud_server.svn2gittest.ipv6_address
  type    = "AAAA"
612
613
}

614
615
resource "hetznerdns_record" "archlinux_org_state_a" {
  zone_id = hetznerdns_zone.archlinux.id
616
617
618
  name    = "state"
  value   = "116.203.16.252"
  type    = "A"
619
620
621
622
}

resource "hetznerdns_record" "archlinux_org_state_aaaa" {
  zone_id = hetznerdns_zone.archlinux.id
623
624
625
  name    = "state"
  value   = "2a01:4f8:c2c:474::1"
  type    = "AAAA"
626
627
628
629
}

resource "hetznerdns_record" "archlinux_org_archive_cname" {
  zone_id = hetznerdns_zone.archlinux.id
630
631
632
  name    = "archive"
  value   = "gemini"
  type    = "CNAME"
633
634
635
636
}

resource "hetznerdns_record" "archlinux_org_conf_cname" {
  zone_id = hetznerdns_zone.archlinux.id
637
638
639
  name    = "conf"
  value   = "apollo"
  type    = "CNAME"
640
641
642
643
}

resource "hetznerdns_record" "archlinux_org_dev_cname" {
  zone_id = hetznerdns_zone.archlinux.id
644
645
646
  name    = "dev"
  value   = "apollo"
  type    = "CNAME"
647
648
649
650
}

resource "hetznerdns_record" "archlinux_org_g2kjxsblac7x_cname" {
  zone_id = hetznerdns_zone.archlinux.id
651
652
653
  name    = "g2kjxsblac7x"
  value   = "gv-i5y6mnrelvpfiu.dv.googlehosted.com."
  type    = "CNAME"
654
655
656
657
}

resource "hetznerdns_record" "archlinux_org_git_cname" {
  zone_id = hetznerdns_zone.archlinux.id
658
659
660
  name    = "git"
  value   = "luna"
  type    = "CNAME"
661
662
663
664
}

resource "hetznerdns_record" "archlinux_org_grafana_cname" {
  zone_id = hetznerdns_zone.archlinux.id
665
666
667
  name    = "grafana"
  value   = "apollo"
  type    = "CNAME"
668
669
670
671
}

resource "hetznerdns_record" "archlinux_org_ipxe_cname" {
  zone_id = hetznerdns_zone.archlinux.id
672
673
674
  name    = "ipxe"
  value   = "apollo"
  type    = "CNAME"
675
676
677
678
}

resource "hetznerdns_record" "archlinux_org_luna2_domainkey_aur_cname" {
  zone_id = hetznerdns_zone.archlinux.id
679
680
681
  name    = "luna2._domainkey.aur"
  value   = "luna2._domainkey"
  type    = "CNAME"
682
683
684
685
}

resource "hetznerdns_record" "archlinux_org_luna2_domainkey_lists_cname" {
  zone_id = hetznerdns_zone.archlinux.id
686
687
688
  name    = "luna2._domainkey.lists"
  value   = "luna2._domainkey"
  type    = "CNAME"
689
690
691
692
}

resource "hetznerdns_record" "archlinux_org_mailman_cname" {
  zone_id = hetznerdns_zone.archlinux.id
693
694
695
  name    = "mailman"
  value   = "apollo"
  type    = "CNAME"
696
697
698
699
}

resource "hetznerdns_record" "archlinux_org_packages_cname" {
  zone_id = hetznerdns_zone.archlinux.id
700
701
702
  name    = "packages"
  value   = "apollo"
  type    = "CNAME"
703
704
705
706
}

resource "hetznerdns_record" "archlinux_org_patchwork_cname" {
  zone_id = hetznerdns_zone.archlinux.id
707
708
709
  name    = "patchwork"
  value   = "apollo"
  type    = "CNAME"
710
711
712
713
}

resource "hetznerdns_record" "archlinux_org_planet_cname" {
  zone_id = hetznerdns_zone.archlinux.id
714
715
716
  name    = "planet"
  value   = "apollo"
  type    = "CNAME"
717
718
719
720
}

resource "hetznerdns_record" "archlinux_org_projects_cname" {
  zone_id = hetznerdns_zone.archlinux.id
721
722
723
  name    = "projects"
  value   = "luna"
  type    = "CNAME"
724
725
726
727
}

resource "hetznerdns_record" "archlinux_org_repos_cname" {
  zone_id = hetznerdns_zone.archlinux.id
728
729
730
  name    = "repos"
  value   = "gemini"
  type    = "CNAME"
731
732
733
734
}

resource "hetznerdns_record" "archlinux_org_rsync_cname" {
  zone_id = hetznerdns_zone.archlinux.id
735
736
737
  name    = "rsync"
  value   = "gemini"
  type    = "CNAME"
738
739
740
741
}

resource "hetznerdns_record" "archlinux_org_security_cname" {
  zone_id = hetznerdns_zone.archlinux.id
742
743
744
  name    = "security"
  value   = "apollo"
  type    = "CNAME"
745
746
747
748
}

resource "hetznerdns_record" "archlinux_org_sources_cname" {
  zone_id = hetznerdns_zone.archlinux.id
749
750
751
  name    = "sources"
  value   = "gemini"
  type    = "CNAME"
752
753
754
755
}

resource "hetznerdns_record" "archlinux_org_static_cname" {
  zone_id = hetznerdns_zone.archlinux.id
756
757
758
  name    = "static"
  value   = "apollo"
  type    = "CNAME"
759
760
761
762
}

resource "hetznerdns_record" "archlinux_org_static_conf_cname" {
  zone_id = hetznerdns_zone.archlinux.id
763
764
765
  name    = "static.conf"
  value   = "apollo"
  type    = "CNAME"
766
767
768
769
}

resource "hetznerdns_record" "archlinux_org_status_cname" {
  zone_id = hetznerdns_zone.archlinux.id
770
771
772
  name    = "status"
  value   = "stats.uptimerobot.com."
  type    = "CNAME"
773
774
775
776
}

resource "hetznerdns_record" "archlinux_org_svn_cname" {
  zone_id = hetznerdns_zone.archlinux.id
777
778
779
  name    = "svn"
  value   = "gemini"
  type    = "CNAME"
780
781
782
783
}

resource "hetznerdns_record" "archlinux_org_wiki_cname" {
  zone_id = hetznerdns_zone.archlinux.id
784
785
786
  name    = "wiki"
  value   = "apollo"
  type    = "CNAME"
787
788
789
790
}

resource "hetznerdns_record" "archlinux_org_www_cname" {
  zone_id = hetznerdns_zone.archlinux.id
791
792
793
  name    = "www"
  value   = "apollo"
  type    = "CNAME"
794
795
796
797
}

resource "hetznerdns_record" "archlinux_org_zabbix_cname" {
  zone_id = hetznerdns_zone.archlinux.id
798
799
800
  name    = "zabbix"
  value   = "apollo"
  type    = "CNAME"
801
802
803
804
}

resource "hetznerdns_record" "archlinux_org_matrix_tcp_srv" {
  zone_id = hetznerdns_zone.archlinux.id
805
806
807
  name    = "_matrix._tcp"
  value   = "10 0 8448 matrix"
  type    = "SRV"
808
809
810
811
}

resource "hetznerdns_record" "archlinux_org_dmarc_txt" {
  zone_id = hetznerdns_zone.archlinux.id
812
813
814
  name    = "_dmarc"
  value   = "\"v=DMARC1; p=none; rua=mailto:dmarc-reports@archlinux.org; ruf=mailto:dmarc-reports@archlinux.org;\""
  type    = "TXT"
815
816
817
818
}

resource "hetznerdns_record" "archlinux_org_github_challenge_archlinux" {
  zone_id = hetznerdns_zone.archlinux.id
819
820
821
  name    = "_github-challenge-archlinux"
  value   = "\"824af4446e\""
  type    = "TXT"
822
823
824
825
}

resource "hetznerdns_record" "archlinux_org_github_challenge_archlinux_www" {
  zone_id = hetznerdns_zone.archlinux.id
826
827
828
  name    = "_github-challenge-archlinux.www"
  value   = "\"b53f311f86\""
  type    = "TXT"
829
830
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
831
resource "hcloud_rdns" "quassel_ipv4" {
832
833
  server_id  = hcloud_server.quassel.id
  ip_address = hcloud_server.quassel.ipv4_address
834
  dns_ptr    = "quassel.archlinux.org"
835
836
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
837
838
839
840
841
842
resource "hcloud_rdns" "quassel_ipv6" {
  server_id  = hcloud_server.quassel.id
  ip_address = hcloud_server.quassel.ipv6_address
  dns_ptr    = "quassel.archlinux.org"
}

Jelle van der Waa's avatar
Jelle van der Waa committed
843
resource "hcloud_server" "quassel" {
844
  name        = "quassel.archlinux.org"
845
  image       = data.hcloud_image.archlinux.id
Jelle van der Waa's avatar
Jelle van der Waa committed
846
  server_type = "cx11"
847
848
849
  lifecycle {
    ignore_changes = [image]
  }
Jelle van der Waa's avatar
Jelle van der Waa committed
850
}
Jelle van der Waa's avatar
Jelle van der Waa committed
851

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
852
resource "hcloud_rdns" "phrik_ipv4" {
853
854
  server_id  = hcloud_server.phrik.id
  ip_address = hcloud_server.phrik.ipv4_address
Jelle van der Waa's avatar
Jelle van der Waa committed
855
856
857
  dns_ptr    = "phrik.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
858
859
860
861
862
863
resource "hcloud_rdns" "phrik_ipv6" {
  server_id  = hcloud_server.phrik.id
  ip_address = hcloud_server.phrik.ipv6_address
  dns_ptr    = "phrik.archlinux.org"
}

Jelle van der Waa's avatar
Jelle van der Waa committed
864
865
resource "hcloud_server" "phrik" {
  name        = "phrik.archlinux.org"
866
  image       = data.hcloud_image.archlinux.id
Jelle van der Waa's avatar
Jelle van der Waa committed
867
  server_type = "cx11"
868
869
870
  lifecycle {
    ignore_changes = [image]
  }
Jelle van der Waa's avatar
Jelle van der Waa committed
871
}
Jelle van der Waa's avatar
Jelle van der Waa committed
872

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
873
resource "hcloud_rdns" "bbs_ipv4" {
874
875
  server_id  = hcloud_server.bbs.id
  ip_address = hcloud_server.bbs.ipv4_address
Jelle van der Waa's avatar
Jelle van der Waa committed
876
877
878
  dns_ptr    = "bbs.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
879
880
881
882
883
884
resource "hcloud_rdns" "bbs_ipv6" {
  server_id  = hcloud_server.bbs.id
  ip_address = hcloud_server.bbs.ipv6_address
  dns_ptr    = "bbs.archlinux.org"
}

Jelle van der Waa's avatar
Jelle van der Waa committed
885
886
resource "hcloud_server" "bbs" {
  name        = "bbs.archlinux.org"
887
  image       = data.hcloud_image.archlinux.id
Jelle van der Waa's avatar
Jelle van der Waa committed
888
  server_type = "cx21"
889
890
891
892
893
  lifecycle {
    ignore_changes = [image]
  }
}

894

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
895
resource "hcloud_rdns" "gitlab_ipv4" {
896
897
  server_id  = hcloud_server.gitlab.id
  ip_address = hcloud_server.gitlab.ipv4_address
898
899
900
  dns_ptr    = "gitlab.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
901
902
903
904
905
906
resource "hcloud_rdns" "gitlab_ipv6" {
  server_id  = hcloud_server.gitlab.id
  ip_address = hcloud_server.gitlab.ipv6_address
  dns_ptr    = "gitlab.archlinux.org"
}

907
908
resource "hcloud_server" "gitlab" {
  name        = "gitlab.archlinux.org"
909
  image       = data.hcloud_image.archlinux.id
910
  server_type = "cx51"
911
912
913
  lifecycle {
    ignore_changes = [image]
  }
Jelle van der Waa's avatar
Jelle van der Waa committed
914
}
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
915

916
resource "hcloud_volume" "gitlab" {
917
918
  name      = "gitlab"
  size      = 1000
919
920
921
922
  server_id = hcloud_server.gitlab.id
}


Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
923
resource "hcloud_rdns" "matrix_ipv4" {
924
925
  server_id  = hcloud_server.matrix.id
  ip_address = hcloud_server.matrix.ipv4_address
Jelle van der Waa's avatar
Jelle van der Waa committed
926
927
928
  dns_ptr    = "matrix.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
929
930
931
932
933
934
resource "hcloud_rdns" "matrix_ipv6" {
  server_id  = hcloud_server.matrix.id
  ip_address = hcloud_server.matrix.ipv6_address
  dns_ptr    = "matrix.archlinux.org"
}

Jelle van der Waa's avatar
Jelle van der Waa committed
935
936
resource "hcloud_server" "matrix" {
  name        = "matrix.archlinux.org"
937
  image       = data.hcloud_image.archlinux.id
938
  server_type = "cpx31"
Jelle van der Waa's avatar
Jelle van der Waa committed
939
940
941
942
  lifecycle {
    ignore_changes = [image]
  }
}
943

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
944
resource "hcloud_rdns" "acccounts_ipv4" {
945
946
  server_id  = hcloud_server.accounts.id
  ip_address = hcloud_server.accounts.ipv4_address
947
948
949
  dns_ptr    = "accounts.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
950
951
952
953
954
955
resource "hcloud_rdns" "acccounts_ipv6" {
  server_id  = hcloud_server.accounts.id
  ip_address = hcloud_server.accounts.ipv6_address
  dns_ptr    = "accounts.archlinux.org"
}

956
957
resource "hcloud_server" "accounts" {
  name        = "accounts.archlinux.org"
958
  image       = data.hcloud_image.archlinux.id
959
  server_type = "cx11"
960
961
  provisioner "local-exec" {
    working_dir = ".."
962
    command     = "ansible-playbook --ssh-extra-args '-o StrictHostKeyChecking=no' playbooks/accounts.archlinux.org.yml"
963
  }
964
965
966
967
  lifecycle {
    ignore_changes = [image]
  }
}
968

969
resource "hcloud_volume" "mirror" {
970
971
  name      = "mirror"
  size      = 100
972
973
974
  server_id = hcloud_server.mirror.id
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
975
resource "hcloud_rdns" "mirror_ipv4" {
976
977
  server_id  = hcloud_server.mirror.id
  ip_address = hcloud_server.mirror.ipv4_address
978
979
980
  dns_ptr    = "mirror.pkgbuild.com"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
981
982
983
984
985
986
resource "hcloud_rdns" "mirror_ipv6" {
  server_id  = hcloud_server.mirror.id
  ip_address = hcloud_server.mirror.ipv6_address
  dns_ptr    = "mirror.pkgbuild.com"
}

987
988
resource "hcloud_server" "mirror" {
  name        = "mirror.pkgbuild.com"
989
  image       = data.hcloud_image.archlinux.id
990
991
992
993
994
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
995

996
997
998
# TODO: This is a temporary box!
# Delete it in 2021.
resource "hcloud_volume" "archconfbox" {
999
1000
  name      = "archconfbox"
  size      = 800
For faster browsing, not all history is shown. View entire blame