dns: switch cname to alias

This commit is contained in:
vincent 2024-02-10 10:39:09 +01:00
parent f61008b570
commit 2632c6d2b0
2 changed files with 3 additions and 1 deletions

View File

@ -73,6 +73,8 @@ gpgsql-user=pdns-auth
{{ with secret "secrets/data/database/pdns"}} {{ with secret "secrets/data/database/pdns"}}
gpgsql-password={{ .Data.data.pdnsauth }} gpgsql-password={{ .Data.data.pdnsauth }}
{{ end }} {{ end }}
resolver=192.168.1.6
expand-alias=yes
include-dir=/etc/powerdns/pdns.d include-dir=/etc/powerdns/pdns.d
EOH EOH
} }

View File

@ -2,7 +2,7 @@ resource "powerdns_record" "Cname" {
for_each = toset(var.cnameList) for_each = toset(var.cnameList)
zone = powerdns_zone.ducampseu.name zone = powerdns_zone.ducampseu.name
name = "${each.key}.${powerdns_zone.ducampseu.name}" name = "${each.key}.${powerdns_zone.ducampseu.name}"
type = "CNAME" type = "ALIAS"
ttl = 1700 ttl = 1700
records = [var.localEndpoint] records = [var.localEndpoint]
} }