Commit 7f90b9ed authored by Kristian Klausen's avatar Kristian Klausen 🎉
Browse files

tf-stage1/archlinux: Avoid similar mx/SPF records by using for_each

parent 05d9a147
......@@ -280,14 +280,6 @@ resource "hetznerdns_record" "archlinux_org_origin_caa" {
type = "CAA"
}
resource "hetznerdns_record" "archlinux_org_origin_mx" {
zone_id = hetznerdns_zone.archlinux.id
name = "@"
ttl = 600
value = "10 mail"
type = "MX"
}
resource "hetznerdns_record" "archlinux_org_origin_ns3" {
zone_id = hetznerdns_zone.archlinux.id
name = "@"
......@@ -378,22 +370,6 @@ resource "hetznerdns_record" "archlinux_org_aur_aaaa" {
type = "AAAA"
}
resource "hetznerdns_record" "archlinux_org_aur_mx" {
zone_id = hetznerdns_zone.archlinux.id
name = "aur"
ttl = 600
value = "10 mail"
type = "MX"
}
resource "hetznerdns_record" "archlinux_org_aur_txt" {
zone_id = hetznerdns_zone.archlinux.id
name = "aur"
ttl = 600
value = "\"v=spf1 a ?all\""
type = "TXT"
}
resource "hetznerdns_record" "archlinux_org_aur_dev_a" {
zone_id = hetznerdns_zone.archlinux.id
name = "aur-dev"
......@@ -600,14 +576,6 @@ resource "hetznerdns_record" "archlinux_org_master_key_aaaa" {
type = "AAAA"
}
resource "hetznerdns_record" "archlinux_org_master_key_mx" {
zone_id = hetznerdns_zone.archlinux.id
name = "master-key"
ttl = 600
value = "10 mail"
type = "MX"
}
resource "hetznerdns_record" "archlinux_org_matrix_a" {
zone_id = hetznerdns_zone.archlinux.id
name = "matrix"
......@@ -645,21 +613,25 @@ resource "hetznerdns_record" "archlinux_org_mail_aaaa" {
type = "AAAA"
}
resource "hetznerdns_record" "archlinux_org_origin_txt" {
resource "hetznerdns_record" "archlinux_org_origin_mx" {
for_each = toset(["@", "aur", "master-key"])
zone_id = hetznerdns_zone.archlinux.id
name = "@"
name = each.value
ttl = 600
# mail.archlinux.org
value = "\"v=spf1 ip4:95.216.189.61 ip6:2a01:4f9:c010:3052::1 ~all\""
type = "TXT"
value = "10 mail"
type = "MX"
}
resource "hetznerdns_record" "archlinux_org_mail_txt" {
resource "hetznerdns_record" "archlinux_org_origin_txt" {
for_each = toset(["@", "aur", "mail", "master-key"])
zone_id = hetznerdns_zone.archlinux.id
name = "mail"
name = each.value
ttl = 600
value = "\"v=spf1 include:archlinux.org -all\""
type = "TXT"
# mail.archlinux.org
value = "\"v=spf1 ip4:95.216.189.61 ip6:2a01:4f9:c010:3052::1 ~all\""
type = "TXT"
}
resource "hetznerdns_record" "archlinux_org_domainkey_dkim-ed25519_txt" {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment