-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsefa_cloud.tf
100 lines (90 loc) · 2.47 KB
/
sefa_cloud.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
resource "hetznerdns_zone" "sefa_cloud" {
name = "sefa.cloud"
ttl = 86400
}
resource "hetznerdns_record" "rootcaa_sefa_cloud" {
for_each = toset(var.caa_records)
zone_id = hetznerdns_zone.sefa_cloud.id
name = "@"
value = each.key
type = "CAA"
}
resource "hetznerdns_record" "eclipse4_sefa_cloud" {
zone_id = hetznerdns_zone.sefa_cloud.id
name = "eclipse"
value = "10.10.10.12"
type = "A"
}
resource "hetznerdns_record" "eclipse6_sefa_cloud" {
zone_id = hetznerdns_zone.sefa_cloud.id
name = "eclipse"
value = "fdcc:546e:5cf:0:da5e:d3ff:feea:f48e"
type = "AAAA"
}
resource "hetznerdns_record" "eclipsecnames_sefa_cloud" {
for_each = toset([
"nzb",
"otel",
"paperless",
"prowlarr",
"radarr",
"sonarr",
"syncthing",
"tls",
"torrent",
"view",
])
zone_id = hetznerdns_zone.sefa_cloud.id
name = "${each.key}.eclipse"
value = "eclipse.sefa.cloud."
type = "CNAME"
}
resource "hetznerdns_record" "cnames_sefa_cloud" {
for_each = toset([
"box",
"buildbot",
"cache",
"cook",
"home",
"immich",
"jellyfin",
"miniflux",
"request",
"vault",
])
zone_id = hetznerdns_zone.sefa_cloud.id
name = each.key
value = "${hetznerdns_zone.sefa_cloud.name}."
type = "CNAME"
}
resource "hetznerdns_record" "cnames_arson_sefa_cloud" {
for_each = toset([
"hass",
])
zone_id = hetznerdns_zone.sefa_cloud.id
name = each.key
value = "arson.${hetznerdns_zone.sefa_cloud.name}."
type = "CNAME"
}
# Verifications
resource "hetznerdns_record" "roottxt_sefa_cloud" {
for_each = tomap({
sendinblue = "Sendinblue-code:40fc54f18aa321c1ef380e8bc74c0f1f"
})
zone_id = hetznerdns_zone.sefa_cloud.id
name = "@"
value = each.value
type = "TXT"
}
# Send in Blue records
resource "hetznerdns_record" "mbotxt_sefa_cloud" {
for_each = tomap({
"@" = "\"v=spf1 include:spf.sendinblue.com mx ~all\""
_dmarc = "\"v=DMARC1; p=none; sp=none; rua=mailto:[email protected]!10m; ruf=mailto:[email protected]!10m; rf=afrf; pct=100; ri=86400\""
"mail._domainkey" = "\"k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDeMVIzrCa3T14JsNY0IRv5/2V1/v2itlviLQBwXsa7shBD6TrBkswsFUToPyMRWC9tbR/5ey0nRBH0ZVxp+lsmTxid2Y2z+FApQ6ra2VsXfbJP3HE6wAO0YTVEJt1TmeczhEd2Jiz/fcabIISgXEdSpTYJhb0ct0VJRxcg4c8c7wIDAQAB\""
})
zone_id = hetznerdns_zone.sefa_cloud.id
name = each.key
value = each.value
type = "TXT"
}