archlinux.tf 34.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
  token = data.external.vault_hetzner.result.hetzner_cloud_api_key
}

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

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
locals {
  archlinux_org_a_aaaa = {
    "@" = {
      ipv4_address = hcloud_server.archlinux.ipv4_address
      ipv6_address = hcloud_server.archlinux.ipv6_address
      ttl          = 600
    }
    accounts = {
      ipv4_address = hcloud_server.accounts.ipv4_address
      ipv6_address = hcloud_server.accounts.ipv6_address
      ttl          = null
    }
    apollo = {
      ipv4_address = "138.201.81.199"
      ipv6_address = "2a01:4f8:172:1d86::1"
      ttl          = 600
    }
    aur = {
      ipv4_address = hcloud_server.aur.ipv4_address
      ipv6_address = hcloud_server.aur.ipv6_address
      ttl          = null
    }
    aur4 = {
      ipv4_address = "5.9.250.164"
      ipv6_address = "2a01:4f8:160:3033::2"
      ttl          = null
    }
    aur-dev = {
      ipv4_address = hcloud_server.aur-dev.ipv4_address
      ipv6_address = hcloud_server.aur-dev.ipv6_address
      ttl          = null
    }
    bbs = {
      ipv4_address = hcloud_server.bbs.ipv4_address
      ipv6_address = hcloud_server.bbs.ipv6_address
      ttl          = null
    }
    bugs = {
      ipv4_address = hcloud_server.bugs.ipv4_address
      ipv6_address = hcloud_server.bugs.ipv6_address
      ttl          = null
    }
    dragon = {
      ipv4_address = "195.201.167.210"
      ipv6_address = "2a01:4f8:13a:102a::2"
      ttl          = null
    }
    gemini = {
      ipv4_address = "49.12.124.107"
      ipv6_address = "2a01:4f8:242:5614::2"
      ttl          = null
    }
    "gitlab.pages" = {
      ipv4_address = hcloud_floating_ip.gitlab_pages.ip_address
      ipv6_address = var.gitlab_pages_ipv6
      ttl          = null
    }
    gitlab = {
      ipv4_address = hcloud_server.gitlab.ipv4_address
      ipv6_address = hcloud_server.gitlab.ipv6_address
      ttl          = null
    }
    homedir = {
      ipv4_address = hcloud_server.homedir.ipv4_address
      ipv6_address = hcloud_server.homedir.ipv6_address
      ttl          = null
    }
    lists = {
      ipv4_address = "5.9.250.164"
      ipv6_address = "2a01:4f8:160:3033::2"
      ttl          = null
    }
    luna = {
      ipv4_address = "5.9.250.164"
      ipv6_address = "2a01:4f8:160:3033::2"
      ttl          = 600
    }
    mailman3 = {
      ipv4_address = hcloud_server.mailman3.ipv4_address
      ipv6_address = hcloud_server.mailman3.ipv4_address
      ttl          = null
    }
    mail = {
      ipv4_address = hcloud_server.mail.ipv4_address
      ipv6_address = hcloud_server.mail.ipv6_address
      ttl          = 600
    }
    master-key = {
      ipv4_address = hcloud_server.archlinux.ipv4_address
      ipv6_address = hcloud_server.archlinux.ipv6_address
      ttl          = 600
    }
    matrix = {
      ipv4_address = hcloud_server.matrix.ipv4_address
      ipv6_address = hcloud_server.matrix.ipv6_address
      ttl          = null
    }
    monitoring = {
      ipv4_address = hcloud_server.monitoring.ipv4_address
      ipv6_address = hcloud_server.monitoring.ipv6_address
      ttl          = null
    }
    openpgpkey = {
      ipv4_address = hcloud_server.openpgpkey.ipv4_address
      ipv6_address = hcloud_server.openpgpkey.ipv6_address
      ttl          = null
    }
    patchwork = {
      ipv4_address = hcloud_server.patchwork.ipv4_address
      ipv6_address = hcloud_server.patchwork.ipv6_address
      ttl          = 600
    }
    phrik = {
      ipv4_address = hcloud_server.phrik.ipv4_address
      ipv6_address = hcloud_server.phrik.ipv6_address
      ttl          = null
    }
    quassel = {
      ipv4_address = hcloud_server.quassel.ipv4_address
      ipv6_address = hcloud_server.quassel.ipv6_address
      ttl          = null
    }
    redirect = {
      ipv4_address = hcloud_server.redirect.ipv4_address
      ipv6_address = hcloud_server.redirect.ipv6_address
      ttl          = null
    }
    reproducible = {
      ipv4_address = hcloud_server.reproducible.ipv4_address
      ipv6_address = hcloud_server.reproducible.ipv6_address
      ttl          = null
    }
    runner1 = {
      ipv4_address = "84.17.49.250"
      ipv6_address = "2a02:6ea0:c719::2"
      ttl          = null
    }
    runner2 = {
      ipv4_address = "147.75.80.217"
      ipv6_address = "2604:1380:2001:4500::3"
      ttl          = null
    }
    secure-runner1 = {
      ipv4_address = "116.202.134.150"
      ipv6_address = "2a01:4f8:231:4e1e::2"
      ttl          = null
    }
    security = {
      ipv4_address = hcloud_server.security.ipv4_address
      ipv6_address = hcloud_server.security.ipv6_address
      ttl          = 600
    }
    state = {
      ipv4_address = "116.203.16.252"
      ipv6_address = "2a01:4f8:c2c:474::1"
      ttl          = null
    }
    svn2gittest = {
      ipv4_address = hcloud_server.svn2gittest.ipv4_address
      ipv6_address = hcloud_server.svn2gittest.ipv6_address
      ttl          = null
    }
    wiki = {
      ipv4_address = hcloud_server.archwiki.ipv4_address
      ipv6_address = hcloud_server.archwiki.ipv6_address
      ttl          = 600
    }
    www = {
      ipv4_address = hcloud_server.archlinux.ipv4_address
      ipv6_address = hcloud_server.archlinux.ipv6_address
      ttl          = 600
    }
  }
}

205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
variable "archlinux_org_cname" {
  type = map(any)
  default = {
    archive                  = { value = "gemini", ttl = null }
    dev                      = { value = "www", ttl = 600 }
    g2kjxsblac7x             = { value = "gv-i5y6mnrelvpfiu.dv.googlehosted.com.", ttl = null }
    git                      = { value = "luna", ttl = null }
    grafana                  = { value = "apollo", ttl = null }
    ipxe                     = { value = "www", ttl = 600 }
    "luna2._domainkey.aur"   = { value = "luna2._domainkey", ttl = null }
    "luna2._domainkey.lists" = { value = "luna2._domainkey", ttl = null }
    mailman                  = { value = "apollo", ttl = null }
    packages                 = { value = "www", ttl = 600 }
    planet                   = { value = "www", ttl = 600 }
    projects                 = { value = "luna", ttl = null }
    repos                    = { value = "gemini", ttl = null }
    rsync                    = { value = "gemini", ttl = null }
    sources                  = { value = "gemini", ttl = null }
223
    "static.conf"            = { value = "redirect", ttl = null }
224
225
226
227
228
229
    static                   = { value = "apollo", ttl = null }
    status                   = { value = "stats.uptimerobot.com.", ttl = null }
    svn                      = { value = "gemini", ttl = null }
  }
}

230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
variable "archlinux_org_gitlab_pages" {
  type = list(object({
    name              = string
    verification_code = string
  }))
  default = [
    {
      name              = "conf"
      verification_code = "60a06a1c02e42b36c3b4919f4d6de6bf"
    },
    {
      name              = "whatcanwedofor",
      verification_code = "b5f8011047c1610ace52e754b568c834"
    }
  ]
}

247
248
resource "hetznerdns_zone" "archlinux" {
  name = "archlinux.org"
249
  ttl  = 86400
250
251
252
253
}

resource "hetznerdns_zone" "pkgbuild" {
  name = "pkgbuild.com"
254
  ttl  = 86400
255
256
257
258
}

resource "hetznerdns_record" "pkgbuild_com_origin_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
259
260
261
  name    = "@"
  value   = "78.46.178.133"
  type    = "A"
262
263
264
265
}

resource "hetznerdns_record" "pkgbuild_com_origin_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
266
267
268
  name    = "@"
  value   = "2a01:4f8:c2c:51e2::1"
  type    = "AAAA"
269
270
271
272
}

resource "hetznerdns_record" "pkgbuild_com_origin_caa" {
  zone_id = hetznerdns_zone.pkgbuild.id
273
274
275
  name    = "@"
  value   = "0 issue \"letsencrypt.org\""
  type    = "CAA"
276
277
278
279
}

resource "hetznerdns_record" "pkgbuild_com_origin_mx" {
  zone_id = hetznerdns_zone.pkgbuild.id
280
281
282
  name    = "@"
  value   = "0 ."
  type    = "MX"
283
284
285
286
}

resource "hetznerdns_record" "pkgbuild_com_origin_ns3" {
  zone_id = hetznerdns_zone.pkgbuild.id
287
288
289
  name    = "@"
  value   = "robotns3.second-ns.com."
  type    = "NS"
290
291
292
293
}

resource "hetznerdns_record" "pkgbuild_com_origin_ns2" {
  zone_id = hetznerdns_zone.pkgbuild.id
294
295
296
  name    = "@"
  value   = "robotns2.second-ns.de."
  type    = "NS"
297
298
299
300
}

resource "hetznerdns_record" "pkgbuild_com_origin_ns1" {
  zone_id = hetznerdns_zone.pkgbuild.id
301
302
303
  name    = "@"
  value   = "ns1.first-ns.de."
  type    = "NS"
304
305
}

306
307
308
309
310
311
312
313
314
# 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"
# }
315
316
317

resource "hetznerdns_record" "pkgbuild_com_origin_txt" {
  zone_id = hetznerdns_zone.pkgbuild.id
318
319
320
  name    = "@"
  value   = "\"v=spf1 -all\""
  type    = "TXT"
321
322
323
324
}

resource "hetznerdns_record" "pkgbuild_com_wildcard_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
325
326
327
  name    = "*"
  value   = "78.46.178.133"
  type    = "A"
328
329
330
331
}

resource "hetznerdns_record" "pkgbuild_com_wildcard_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
332
333
334
  name    = "*"
  value   = "2a01:4f8:c2c:51e2::1"
  type    = "AAAA"
335
336
337
338
}

resource "hetznerdns_record" "pkgbuild_com_mirror_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
339
340
341
  name    = "mirror"
  value   = "78.46.209.220"
  type    = "A"
342
343
344
345
}

resource "hetznerdns_record" "pkgbuild_com_mirror_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
346
347
348
  name    = "mirror"
  value   = "2a01:4f8:c2c:c62f::1"
  type    = "AAAA"
349
350
}

Jelle van der Waa's avatar
Jelle van der Waa committed
351
352
353
354
355
356
357
resource "hetznerdns_record" "pkgbuild_com_america_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "america.mirror"
  value   = "143.244.34.62"
  type    = "A"
}

358
359
360
361
362
363
364
resource "hetznerdns_record" "pkgbuild_com_america_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "america.mirror"
  value   = "2a02:6ea0:cc0e::2"
  type    = "AAAA"
}

365
366
367
368
369
370
371
372
373
374
375
376
377
378
resource "hetznerdns_record" "pkgbuild_com_america_archive_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "america.archive"
  value   = "143.244.34.62"
  type    = "A"
}

resource "hetznerdns_record" "pkgbuild_com_america_archive_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "america.archive"
  value   = "2a02:6ea0:cc0e::2"
  type    = "AAAA"
}

Jelle van der Waa's avatar
Jelle van der Waa committed
379
380
381
382
383
384
385
resource "hetznerdns_record" "pkgbuild_com_asia_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "asia.mirror"
  value   = "84.17.57.98"
  type    = "A"
}

386
387
388
389
390
391
392
resource "hetznerdns_record" "pkgbuild_com_asia_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "asia.mirror"
  value   = "2a02:6ea0:d605::2"
  type    = "AAAA"
}

393
394
395
396
397
398
399
400
401
402
403
404
405
406
resource "hetznerdns_record" "pkgbuild_com_asia_archive_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "asia.archive"
  value   = "84.17.57.98"
  type    = "A"
}

resource "hetznerdns_record" "pkgbuild_com_asia_archive_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "asia.archive"
  value   = "2a02:6ea0:d605::2"
  type    = "AAAA"
}

Jelle van der Waa's avatar
Jelle van der Waa committed
407
408
409
410
411
412
413
resource "hetznerdns_record" "pkgbuild_com_europe_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "europe.mirror"
  value   = "89.187.191.12"
  type    = "A"
}

414
415
416
417
418
419
420
resource "hetznerdns_record" "pkgbuild_com_europe_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "europe.mirror"
  value   = "2a02:6ea0:c237::2"
  type    = "AAAA"
}

421
422
423
424
425
426
427
428
429
resource "hetznerdns_record" "pkgbuild_com_europe_archive_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "europe.archive"
  value   = "89.187.191.12"
  type    = "A"
}

resource "hetznerdns_record" "pkgbuild_com_europe_archive_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
430
  name    = "europe.archive"
431
432
433
434
  value   = "2a02:6ea0:c237::2"
  type    = "AAAA"
}

435
resource "hetznerdns_record" "pkgbuild_com_repro1_a" {
436
  zone_id = hetznerdns_zone.pkgbuild.id
437
  name    = "repro1"
438
439
  value   = "147.75.81.79"
  type    = "A"
440
441
}

442
resource "hetznerdns_record" "pkgbuild_com_repro1_aaaa" {
443
  zone_id = hetznerdns_zone.pkgbuild.id
444
  name    = "repro1"
445
446
  value   = "2604:1380:2001:4500::1"
  type    = "AAAA"
447
448
}

Jelle van der Waa's avatar
Jelle van der Waa committed
449
450
451
452
453
454
455
resource "hetznerdns_record" "pkgbuild_com_repro2_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "repro2"
  value   = "212.102.38.209"
  type    = "A"
}

456
457
458
459
460
461
462
resource "hetznerdns_record" "pkgbuild_com_repro2_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
  name    = "repro2"
  value   = "2a02:6ea0:c238::2"
  type    = "AAAA"
}

463
464
resource "hetznerdns_record" "pkgbuild_com_www_a" {
  zone_id = hetznerdns_zone.pkgbuild.id
465
466
467
  name    = "www"
  value   = "78.46.178.133"
  type    = "A"
468
469
470
471
}

resource "hetznerdns_record" "pkgbuild_com_www_aaaa" {
  zone_id = hetznerdns_zone.pkgbuild.id
472
473
474
  name    = "www"
  value   = "2a01:4f8:c2c:51e2::1"
  type    = "AAAA"
475
476
}

477
478
resource "hetznerdns_record" "archlinux_org_a" {
  for_each = local.archlinux_org_a_aaaa
479
480
481
482

  zone_id = hetznerdns_zone.archlinux.id
  name    = each.key
  ttl     = each.value.ttl
483
484
  value   = each.value.ipv4_address
  type    = "A"
485
486
}

487
488
resource "hetznerdns_record" "archlinux_org_aaaa" {
  for_each = local.archlinux_org_a_aaaa
489

490
  zone_id = hetznerdns_zone.archlinux.id
491
492
493
494
  name    = each.key
  ttl     = each.value.ttl
  value   = each.value.ipv6_address
  type    = "AAAA"
495
496
}

497
498
499
resource "hetznerdns_record" "archlinux_org_cname" {
  for_each = var.archlinux_org_cname

500
  zone_id = hetznerdns_zone.archlinux.id
501
502
503
504
  name    = each.key
  ttl     = each.value.ttl
  value   = each.value.value
  type    = "CNAME"
505
506
}

507

508
509
resource "hetznerdns_record" "archlinux_org_origin_caa" {
  zone_id = hetznerdns_zone.archlinux.id
510
511
512
  name    = "@"
  value   = "0 issue \"letsencrypt.org\""
  type    = "CAA"
513
514
515
516
}

resource "hetznerdns_record" "archlinux_org_origin_ns3" {
  zone_id = hetznerdns_zone.archlinux.id
517
518
519
  name    = "@"
  value   = "robotns3.second-ns.com."
  type    = "NS"
520
521
522
523
}

resource "hetznerdns_record" "archlinux_org_origin_ns2" {
  zone_id = hetznerdns_zone.archlinux.id
524
525
526
  name    = "@"
  value   = "robotns2.second-ns.de."
  type    = "NS"
527
528
529
530
}

resource "hetznerdns_record" "archlinux_org_origin_ns1" {
  zone_id = hetznerdns_zone.archlinux.id
531
532
533
  name    = "@"
  value   = "ns1.first-ns.de."
  type    = "NS"
534
535
}

536
537
538
539
540
541
542
543
544
# 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"
# }
545
546
547

resource "hetznerdns_record" "archlinux_org_origin_apollo_domainkey_txt" {
  zone_id = hetznerdns_zone.archlinux.id
548
  name    = "apollo._domainkey"
549
  ttl     = 600
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
550
  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==\" "
551
  type    = "TXT"
552
553
554
555
}

resource "hetznerdns_record" "archlinux_org_lists_mx" {
  zone_id = hetznerdns_zone.archlinux.id
556
  name    = "lists"
557
  ttl     = 600
558
559
  value   = "10 luna"
  type    = "MX"
560
561
}

562
563
564
565
566
567
568
569
570
resource "hetznerdns_record" "archlinux_org_lists_txt" {
  zone_id = hetznerdns_zone.archlinux.id
  name    = "lists"
  ttl     = 600
  # lists.archlinux.org
  value = "\"v=spf1 ip4:5.9.250.164 ip6:2a01:4f8:160:3033::2 ~all\""
  type  = "TXT"
}

571
572
resource "hetznerdns_record" "archlinux_org_luna_txt" {
  zone_id = hetznerdns_zone.archlinux.id
573
  name    = "luna._domainkey"
574
  ttl     = 600
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
575
  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==\" "
576
  type    = "TXT"
577
578
579
580
}

resource "hetznerdns_record" "archlinux_org_luna2_txt" {
  zone_id = hetznerdns_zone.archlinux.id
581
  name    = "luna2._domainkey"
582
  ttl     = 600
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
583
  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==\" "
584
  type    = "TXT"
585
586
}

587
588
589
590
591
592
593
594
resource "hetznerdns_record" "archlinux_org_luna3_txt" {
  zone_id = hetznerdns_zone.archlinux.id
  name    = "luna"
  ttl     = 600
  value   = "\"v=spf1 include:lists.archlinux.org -all\""
  type    = "TXT"
}

595
resource "hetznerdns_record" "archlinux_org_mtasts_cname" {
596
597
  for_each = toset(["", ".aur", ".master-key", ".lists"])

598
  zone_id = hetznerdns_zone.archlinux.id
599
  name    = "mta-sts${each.value}"
600
601
602
603
604
  value   = "mail"
  type    = "CNAME"
}

resource "hetznerdns_record" "archlinux_org__mtasts_txt" {
605
606
  for_each = toset(["", ".aur", ".master-key", ".lists"])

607
  zone_id = hetznerdns_zone.archlinux.id
608
  name    = "_mta-sts${each.value}"
609
610
611
612
613
614
  ttl     = 600
  # date +%s
  value = "\"v=STSv1; id=1608210175\""
  type  = "TXT"
}

615
616
617
resource "hetznerdns_record" "archlinux_org_origin_mx" {
  for_each = toset(["@", "aur", "master-key"])

618
  zone_id = hetznerdns_zone.archlinux.id
619
  name    = each.value
620
  ttl     = 600
621
622
  value   = "10 mail"
  type    = "MX"
623
624
}

625
626
627
resource "hetznerdns_record" "archlinux_org_origin_txt" {
  for_each = toset(["@", "aur", "mail", "master-key"])

628
  zone_id = hetznerdns_zone.archlinux.id
629
  name    = each.value
630
  ttl     = 600
631
632
633
  # mail.archlinux.org
  value = "\"v=spf1 ip4:95.216.189.61 ip6:2a01:4f9:c010:3052::1 ~all\""
  type  = "TXT"
634
635
}

636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
resource "hetznerdns_record" "archlinux_org_domainkey_dkim-ed25519_txt" {
  zone_id = hetznerdns_zone.archlinux.id
  name    = "dkim-ed25519._domainkey"
  ttl     = 600
  value   = "\"v=DKIM1; k=ed25519; \" \"p=XOHB7b7V1puX+FryNIhsjXHYIFqk+q6JRu4XQ7Jc8MQ=\" "
  type    = "TXT"
}

resource "hetznerdns_record" "archlinux_org_domainkey_dkim-rsa_txt" {
  zone_id = hetznerdns_zone.archlinux.id
  name    = "dkim-rsa._domainkey"
  ttl     = 600
  value   = "\"v=DKIM1; k=rsa; \" \"p=MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA1GjGrEczq7iHZbvT7wa4ltJz2jwSndUGdRHgfEPnGBeevOXEAlEFr4zsdkfZEaNaQLIhZNpvKAt/A+kkyalkj4u9AnxqeNsNmZflFl6TKgvh0tWNEP3+XNxfdQ7zfml4WggL/YdAjXngg42oZEUsnS/6iozOFn7bNvzqBx5PFJ21pgyuR8DWyLaeOt+p55dVed7DCKnKi11Xjiu7k\" \"H68W8rose7g8Fv9fecBatEE4jwloOXsjh+tH0iab1NSSSpIq6EdgcPrpmrllN3/n2J/kCGK6ztISB6vR7xWgvgHSMjmEL0GPWzohGPrw2UQhZhrNV8dJpiLRYmfK+rXaKF0Kqag/F0e4C4jCKFX7NYFcYXYRlN5QlDFjZvUmOILlgnZ8w/SdZUKzpLObGuwnANLG+WSOjw42p9mXVGN6AfOQPu8OjRjS1MyhcdDIbUvZiQjbmiVJ5frpYZ39BTg\" \"CIzYLJJ5932+3gnwROu1OeljWkpBkfHZXPzADus80l3Vxsk91XZVB36rN8tyuMownR/M4HNC7ZE/EBwOnn1mGH7bLd6pva8u5Qy8Y6LrDdYea5Kk7aZ2WJSSRTV+nkPvOEIx+DfsIWNfmkVWzmuVky96fRvwOCuh38w8zpmlqzhDuGSQrBaLFXwAC7LYQ6kPDHzrjQhs99ScR0ix6YclrmpimMcCAwEAAQ==\" "
  type    = "TXT"
}

652
653
654
655
656
657
658
resource "hetznerdns_record" "archlinux_org_dmarc_txt" {
  zone_id = hetznerdns_zone.archlinux.id
  name    = "_dmarc"
  value   = "\"v=DMARC1; p=none; rua=mailto:dmarc-reports@archlinux.org; ruf=mailto:dmarc-reports@archlinux.org;\""
  type    = "TXT"
}

Kristian Klausen's avatar
Kristian Klausen committed
659
resource "hetznerdns_record" "archlinux_org_smtp_tlsrpt_txt" {
660
661
  for_each = toset(["", ".aur", ".master-key", ".lists"])

Kristian Klausen's avatar
Kristian Klausen committed
662
  zone_id = hetznerdns_zone.archlinux.id
663
  name    = "_smtp._tls${each.value}"
Kristian Klausen's avatar
Kristian Klausen committed
664
665
666
667
  value   = "\"v=TLSRPTv1;rua=mailto:postmaster@archlinux.org\""
  type    = "TXT"
}

668
669
resource "hetznerdns_record" "archlinux_org_matrix_tcp_srv" {
  zone_id = hetznerdns_zone.archlinux.id
670
671
672
  name    = "_matrix._tcp"
  value   = "10 0 8448 matrix"
  type    = "SRV"
673
674
675
676
}

resource "hetznerdns_record" "archlinux_org_github_challenge_archlinux" {
  zone_id = hetznerdns_zone.archlinux.id
677
678
679
  name    = "_github-challenge-archlinux"
  value   = "\"824af4446e\""
  type    = "TXT"
680
681
682
683
}

resource "hetznerdns_record" "archlinux_org_github_challenge_archlinux_www" {
  zone_id = hetznerdns_zone.archlinux.id
684
685
686
  name    = "_github-challenge-archlinux.www"
  value   = "\"b53f311f86\""
  type    = "TXT"
687
688
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
689
resource "hcloud_rdns" "quassel_ipv4" {
690
691
  server_id  = hcloud_server.quassel.id
  ip_address = hcloud_server.quassel.ipv4_address
692
  dns_ptr    = "quassel.archlinux.org"
693
694
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
695
696
697
698
699
700
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
701
resource "hcloud_server" "quassel" {
702
  name        = "quassel.archlinux.org"
703
  image       = data.hcloud_image.archlinux.id
Jelle van der Waa's avatar
Jelle van der Waa committed
704
  server_type = "cx11"
705
706
707
  lifecycle {
    ignore_changes = [image]
  }
Jelle van der Waa's avatar
Jelle van der Waa committed
708
}
Jelle van der Waa's avatar
Jelle van der Waa committed
709

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
710
resource "hcloud_rdns" "phrik_ipv4" {
711
712
  server_id  = hcloud_server.phrik.id
  ip_address = hcloud_server.phrik.ipv4_address
Jelle van der Waa's avatar
Jelle van der Waa committed
713
714
715
  dns_ptr    = "phrik.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
716
717
718
719
720
721
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
722
723
resource "hcloud_server" "phrik" {
  name        = "phrik.archlinux.org"
724
  image       = data.hcloud_image.archlinux.id
Jelle van der Waa's avatar
Jelle van der Waa committed
725
  server_type = "cx11"
726
727
728
  lifecycle {
    ignore_changes = [image]
  }
Jelle van der Waa's avatar
Jelle van der Waa committed
729
}
Jelle van der Waa's avatar
Jelle van der Waa committed
730

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
731
resource "hcloud_rdns" "bbs_ipv4" {
732
733
  server_id  = hcloud_server.bbs.id
  ip_address = hcloud_server.bbs.ipv4_address
Jelle van der Waa's avatar
Jelle van der Waa committed
734
735
736
  dns_ptr    = "bbs.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
737
738
739
740
741
742
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
743
744
resource "hcloud_server" "bbs" {
  name        = "bbs.archlinux.org"
745
  image       = data.hcloud_image.archlinux.id
Jelle van der Waa's avatar
Jelle van der Waa committed
746
  server_type = "cx21"
747
748
749
750
751
  lifecycle {
    ignore_changes = [image]
  }
}

752

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
753
resource "hcloud_rdns" "gitlab_ipv4" {
754
755
  server_id  = hcloud_server.gitlab.id
  ip_address = hcloud_server.gitlab.ipv4_address
756
757
758
  dns_ptr    = "gitlab.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
759
760
761
762
763
764
resource "hcloud_rdns" "gitlab_ipv6" {
  server_id  = hcloud_server.gitlab.id
  ip_address = hcloud_server.gitlab.ipv6_address
  dns_ptr    = "gitlab.archlinux.org"
}

765
766
resource "hcloud_server" "gitlab" {
  name        = "gitlab.archlinux.org"
767
  image       = data.hcloud_image.archlinux.id
768
  server_type = "cx51"
769
770
771
  lifecycle {
    ignore_changes = [image]
  }
Jelle van der Waa's avatar
Jelle van der Waa committed
772
}
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
773

774
775
776
777
778
779
780
781
782
783
resource "hcloud_floating_ip" "gitlab_pages" {
  type        = "ipv4"
  description = "GitLab Pages"
  server_id   = hcloud_server.gitlab.id
}

variable "gitlab_pages_ipv6" {
  default = "2a01:4f8:c2c:5d2d::2"
}

784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
resource "hetznerdns_record" "archlinux_org_gitlab_pages_cname" {
  for_each = { for p in var.archlinux_org_gitlab_pages : p.name => p }

  zone_id = hetznerdns_zone.archlinux.id
  name    = each.value.name
  value   = "pages.archlinux.org."
  type    = "CNAME"
}

resource "hetznerdns_record" "archlinux_org_gitlab_pages_verification_code_txt" {
  for_each = { for p in var.archlinux_org_gitlab_pages : p.name => p }

  zone_id = hetznerdns_zone.archlinux.id
  name    = "_gitlab-pages-verification-code.${each.value.name}"
  value   = "gitlab-pages-verification-code=${each.value.verification_code}"
  type    = "TXT"
}

802
resource "hcloud_volume" "gitlab" {
803
804
  name      = "gitlab"
  size      = 1000
805
806
807
808
  server_id = hcloud_server.gitlab.id
}


Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
809
resource "hcloud_rdns" "matrix_ipv4" {
810
811
  server_id  = hcloud_server.matrix.id
  ip_address = hcloud_server.matrix.ipv4_address
Jelle van der Waa's avatar
Jelle van der Waa committed
812
813
814
  dns_ptr    = "matrix.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
815
816
817
818
819
820
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
821
822
resource "hcloud_server" "matrix" {
  name        = "matrix.archlinux.org"
823
  image       = data.hcloud_image.archlinux.id
824
  server_type = "cpx31"
Jelle van der Waa's avatar
Jelle van der Waa committed
825
826
827
828
  lifecycle {
    ignore_changes = [image]
  }
}
829

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

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

842
843
resource "hcloud_server" "accounts" {
  name        = "accounts.archlinux.org"
844
  image       = data.hcloud_image.archlinux.id
845
  server_type = "cx11"
846
847
  provisioner "local-exec" {
    working_dir = ".."
848
    command     = "ansible-playbook --ssh-extra-args '-o StrictHostKeyChecking=no' playbooks/accounts.archlinux.org.yml"
849
  }
850
851
852
853
  lifecycle {
    ignore_changes = [image]
  }
}
854

855
resource "hcloud_volume" "mirror" {
856
857
  name      = "mirror"
  size      = 100
858
859
860
  server_id = hcloud_server.mirror.id
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
861
resource "hcloud_rdns" "mirror_ipv4" {
862
863
  server_id  = hcloud_server.mirror.id
  ip_address = hcloud_server.mirror.ipv4_address
864
865
866
  dns_ptr    = "mirror.pkgbuild.com"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
867
868
869
870
871
872
resource "hcloud_rdns" "mirror_ipv6" {
  server_id  = hcloud_server.mirror.id
  ip_address = hcloud_server.mirror.ipv6_address
  dns_ptr    = "mirror.pkgbuild.com"
}

873
874
resource "hcloud_server" "mirror" {
  name        = "mirror.pkgbuild.com"
875
  image       = data.hcloud_image.archlinux.id
876
877
878
879
880
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
881

882

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
883
resource "hcloud_rdns" "homedir_ipv4" {
884
885
886
887
888
  server_id  = hcloud_server.homedir.id
  ip_address = hcloud_server.homedir.ipv4_address
  dns_ptr    = "homedir.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
889
890
891
892
893
894
resource "hcloud_rdns" "homedir_ipv6" {
  server_id  = hcloud_server.homedir.id
  ip_address = hcloud_server.homedir.ipv6_address
  dns_ptr    = "homedir.archlinux.org"
}

895
896
897
898
899
900
901
902
903
904
resource "hcloud_server" "homedir" {
  name        = "homedir.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}

resource "hcloud_volume" "homedir" {
905
906
  name      = "homedir"
  size      = 100
907
908
  server_id = hcloud_server.homedir.id
}
909

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
910
resource "hcloud_rdns" "bugs_ipv4" {
911
912
913
914
915
  server_id  = hcloud_server.bugs.id
  ip_address = hcloud_server.bugs.ipv4_address
  dns_ptr    = "bugs.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
916
917
918
919
920
921
resource "hcloud_rdns" "bugs_ipv6" {
  server_id  = hcloud_server.bugs.id
  ip_address = hcloud_server.bugs.ipv6_address
  dns_ptr    = "bugs.archlinux.org"
}

922
923
924
925
926
927
928
929
resource "hcloud_server" "bugs" {
  name        = "bugs.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
930

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
931
resource "hcloud_rdns" "aur_ipv4" {
932
933
934
935
936
  server_id  = hcloud_server.aur.id
  ip_address = hcloud_server.aur.ipv4_address
  dns_ptr    = "aur.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
937
938
939
940
941
942
resource "hcloud_rdns" "aur_ipv6" {
  server_id  = hcloud_server.aur.id
  ip_address = hcloud_server.aur.ipv6_address
  dns_ptr    = "aur.archlinux.org"
}

943
944
945
resource "hcloud_server" "aur" {
  name        = "aur.archlinux.org"
  image       = data.hcloud_image.archlinux.id
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
946
947
  server_type = "cpx41"
  keep_disk   = true
948
949
950
951
952
  lifecycle {
    ignore_changes = [image]
  }
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
953
resource "hcloud_rdns" "aur-dev_ipv4" {
954
955
956
957
958
  server_id  = hcloud_server.aur-dev.id
  ip_address = hcloud_server.aur-dev.ipv4_address
  dns_ptr    = "aur-dev.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
959
960
961
962
963
964
resource "hcloud_rdns" "aur-dev_ipv6" {
  server_id  = hcloud_server.aur-dev.id
  ip_address = hcloud_server.aur-dev.ipv6_address
  dns_ptr    = "aur-dev.archlinux.org"
}

965
966
967
968
969
970
971
972
resource "hcloud_server" "aur-dev" {
  name        = "aur-dev.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
973

974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
resource "hcloud_rdns" "redirect_ipv4" {
  server_id  = hcloud_server.redirect.id
  ip_address = hcloud_server.redirect.ipv4_address
  dns_ptr    = "redirect.archlinux.org"
}

resource "hcloud_rdns" "redirect_ipv6" {
  server_id  = hcloud_server.redirect.id
  ip_address = hcloud_server.redirect.ipv6_address
  dns_ptr    = "redirect.archlinux.org"
}

resource "hcloud_server" "redirect" {
  name        = "redirect.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
995
resource "hcloud_rdns" "mailman3_ipv4" {
996
997
998
999
1000
  server_id  = hcloud_server.mailman3.id
  ip_address = hcloud_server.mailman3.ipv4_address
  dns_ptr    = "mailman3.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
1001
1002
1003
1004
1005
1006
resource "hcloud_rdns" "mailman3_ipv6" {
  server_id  = hcloud_server.mailman3.id
  ip_address = hcloud_server.mailman3.ipv6_address
  dns_ptr    = "mailman3.archlinux.org"
}

1007
1008
1009
1010
1011
1012
1013
1014
1015
resource "hcloud_server" "mailman3" {
  name        = "mailman3.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
1016
resource "hcloud_rdns" "reproducible_ipv4" {
1017
1018
1019
1020
1021
  server_id  = hcloud_server.reproducible.id
  ip_address = hcloud_server.reproducible.ipv4_address
  dns_ptr    = "reproducible.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
1022
1023
1024
1025
1026
1027
resource "hcloud_rdns" "reproducible_ipv6" {
  server_id  = hcloud_server.reproducible.id
  ip_address = hcloud_server.reproducible.ipv6_address
  dns_ptr    = "reproducible.archlinux.org"
}

1028
1029
1030
1031
1032
1033
1034
1035
resource "hcloud_server" "reproducible" {
  name        = "reproducible.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
1036

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
1037
resource "hcloud_rdns" "monitoring_ipv4" {
1038
1039
1040
1041
1042
  server_id  = hcloud_server.monitoring.id
  ip_address = hcloud_server.monitoring.ipv4_address
  dns_ptr    = "monitoring.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
1043
1044
1045
1046
1047
1048
resource "hcloud_rdns" "monitoring_ipv6" {
  server_id  = hcloud_server.monitoring.id
  ip_address = hcloud_server.monitoring.ipv6_address
  dns_ptr    = "monitoring.archlinux.org"
}

1049
1050
1051
1052
1053
1054
1055
1056
resource "hcloud_server" "monitoring" {
  name        = "monitoring.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
1057

1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
resource "hcloud_rdns" "svn2gittest_ipv4" {
  server_id  = hcloud_server.svn2gittest.id
  ip_address = hcloud_server.svn2gittest.ipv4_address
  dns_ptr    = "svn2gittest.archlinux.org"
}

resource "hcloud_rdns" "svn2gittest_ipv6" {
  server_id  = hcloud_server.svn2gittest.id
  ip_address = hcloud_server.svn2gittest.ipv6_address
  dns_ptr    = "svn2gittest.archlinux.org"
}

1070
1071
1072
1073
1074
1075
1076
1077
resource "hcloud_server" "svn2gittest" {
  name        = "svn2gittest"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
1078

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
1079
resource "hcloud_rdns" "mail_ipv4" {
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
1080
1081
  server_id  = hcloud_server.mail.id
  ip_address = hcloud_server.mail.ipv4_address
1082
1083
1084
  dns_ptr    = "mail.archlinux.org"
}

Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
1085
1086
1087
1088
1089
1090
resource "hcloud_rdns" "mail_ipv6" {
  server_id  = hcloud_server.mail.id
  ip_address = hcloud_server.mail.ipv6_address
  dns_ptr    = "mail.archlinux.org"
}

1091
1092
1093
1094
1095
1096
1097
1098
resource "hcloud_server" "mail" {
  name        = "mail.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119

resource "hcloud_rdns" "openpgpkey_ipv4" {
  server_id  = hcloud_server.openpgpkey.id
  ip_address = hcloud_server.openpgpkey.ipv4_address
  dns_ptr    = "openpgpkey.archlinux.org"
}

resource "hcloud_rdns" "openpgpkey_ipv6" {
  server_id  = hcloud_server.openpgpkey.id
  ip_address = hcloud_server.openpgpkey.ipv6_address
  dns_ptr    = "openpgpkey.archlinux.org"
}

resource "hcloud_server" "openpgpkey" {
  name        = "openpgpkey.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135

resource "hcloud_rdns" "archlinux_ipv4" {
  server_id  = hcloud_server.archlinux.id
  ip_address = hcloud_server.archlinux.ipv4_address
  dns_ptr    = "archlinux.org"
}

resource "hcloud_rdns" "archlinux_ipv6" {
  server_id  = hcloud_server.archlinux.id
  ip_address = hcloud_server.archlinux.ipv6_address
  dns_ptr    = "archlinux.org"
}

resource "hcloud_server" "archlinux" {
  name        = "archlinux.org"
  image       = data.hcloud_image.archlinux.id
1136
  server_type = "cpx11"
1137
1138
1139
1140
  lifecycle {
    ignore_changes = [image]
  }
}
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161

resource "hcloud_rdns" "archwiki_ipv4" {
  server_id  = hcloud_server.archwiki.id
  ip_address = hcloud_server.archwiki.ipv4_address
  dns_ptr    = "wiki.archlinux.org"
}

resource "hcloud_rdns" "archwiki_ipv6" {
  server_id  = hcloud_server.archwiki.id
  ip_address = hcloud_server.archwiki.ipv6_address
  dns_ptr    = "wiki.archlinux.org"
}

resource "hcloud_server" "archwiki" {
  name        = "wiki.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cpx11"
  lifecycle {
    ignore_changes = [image]
  }
}
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182

resource "hcloud_rdns" "patchwork_ipv4" {
  server_id  = hcloud_server.patchwork.id
  ip_address = hcloud_server.patchwork.ipv4_address
  dns_ptr    = "patchwork.archlinux.org"
}

resource "hcloud_rdns" "patchwork_ipv6" {
  server_id  = hcloud_server.patchwork.id
  ip_address = hcloud_server.patchwork.ipv6_address
  dns_ptr    = "patchwork.archlinux.org"
}

resource "hcloud_server" "patchwork" {
  name        = "patchwork.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203

resource "hcloud_rdns" "security_ipv4" {
  server_id  = hcloud_server.security.id
  ip_address = hcloud_server.security.ipv4_address
  dns_ptr    = "security.archlinux.org"
}

resource "hcloud_rdns" "security_ipv6" {
  server_id  = hcloud_server.security.id
  ip_address = hcloud_server.security.ipv6_address
  dns_ptr    = "security.archlinux.org"
}

resource "hcloud_server" "security" {
  name        = "security.archlinux.org"
  image       = data.hcloud_image.archlinux.id
  server_type = "cx11"
  lifecycle {
    ignore_changes = [image]
  }
}