fix: minor fix

main
Ricard Illa 2023-05-25 13:16:44 +02:00
parent c9eb813b24
commit 53ff79a63a
2 changed files with 31 additions and 3 deletions

View File

@ -3,6 +3,14 @@ resource "hetznerdns_zone" "monotremata_xyz" {
ttl = 86400 ttl = 86400
} }
resource "hetznerdns_record" "caladan_a_root" {
zone_id = hetznerdns_zone.monotremata_xyz.id
name = "@"
value = var.caladan.ipv4
type = "A"
ttl = 86400
}
resource "hetznerdns_record" "caladan_a" { resource "hetznerdns_record" "caladan_a" {
zone_id = hetznerdns_zone.monotremata_xyz.id zone_id = hetznerdns_zone.monotremata_xyz.id
name = each.key name = each.key
@ -12,6 +20,14 @@ resource "hetznerdns_record" "caladan_a" {
for_each = var.caladan.domains for_each = var.caladan.domains
} }
resource "hetznerdns_record" "caladan_aAAA_root" {
zone_id = hetznerdns_zone.monotremata_xyz.id
name = "@"
value = var.caladan.ipv6
type = "AAAA"
ttl = 86400
}
resource "hetznerdns_record" "caladan_aaaa" { resource "hetznerdns_record" "caladan_aaaa" {
zone_id = hetznerdns_zone.monotremata_xyz.id zone_id = hetznerdns_zone.monotremata_xyz.id
name = each.key name = each.key

View File

@ -9,6 +9,12 @@ resource "linode_domain" "monotremata_xyz" {
soa_email = format("admin@%s", var.domain) soa_email = format("admin@%s", var.domain)
} }
resource "linode_domain_record" "caladan_a_root" {
domain_id = linode_domain.monotremata_xyz.id
record_type = "A"
target = var.caladan.ipv4
}
resource "linode_domain_record" "caladan_a" { resource "linode_domain_record" "caladan_a" {
domain_id = linode_domain.monotremata_xyz.id domain_id = linode_domain.monotremata_xyz.id
name = each.key name = each.key
@ -17,6 +23,12 @@ resource "linode_domain_record" "caladan_a" {
for_each = var.caladan.domains for_each = var.caladan.domains
} }
resource "linode_domain_record" "caladan_aaaa_root" {
domain_id = linode_domain.monotremata_xyz.id
record_type = "AAAA"
target = var.caladan.ipv6
}
resource "linode_domain_record" "caladan_aaaa" { resource "linode_domain_record" "caladan_aaaa" {
domain_id = linode_domain.monotremata_xyz.id domain_id = linode_domain.monotremata_xyz.id
name = each.key name = each.key
@ -43,7 +55,7 @@ resource "linode_domain_record" "mx" {
priority = null priority = null
} }
MX = { MX = {
name = var.domain, name = null
target = format("mail.%s", var.domain) target = format("mail.%s", var.domain)
priority = 0 priority = 0
} }
@ -68,7 +80,7 @@ resource "linode_domain_record" "mx2" {
priority = null priority = null
} }
MX = { MX = {
name = var.domain name = null
target = format("mx2.%s", var.domain) target = format("mx2.%s", var.domain)
priority = 5 priority = 5
} }
@ -82,7 +94,7 @@ resource "linode_domain_record" "mail_txt" {
target = each.value.target target = each.value.target
for_each = { for_each = {
spf = { spf = {
name = var.domain name = null
target = "v=spf1 mx -all" target = "v=spf1 mx -all"
} }
dmarc = { dmarc = {