timohirt / terraform-provider-hetznerdns

Terraform provider for Hetzner DNS
Mozilla Public License 2.0
109 stars 21 forks source link

dot or no dot #19

Open c33s opened 4 years ago

c33s commented 4 years ago

for everyone configures bind dns server it's quite common to add a dot at the end of a domain in the config. some abstractions or gui interfaces try to help you and don't require you to add a dot on the end.

but how is it handled here? zone domain with dot or without dot? cname with dot or without? should be somehow handled in the provider docs and maybe add some warning messages if a cname record is created without a dot at the end.

martinseener commented 2 years ago

As far as I can see in the Hetzner DNS Console when creating entries or when using this terraform module (thx alot @timohirt !) I have to use the dot at the end of the name if it's already an FQDN and the actual domain should NOT be appended. Code example for hetzners own DNS:

resource "hetznerdns_record" "domain_com_ns1" {
  zone_id = hetznerdns_zone.domain_com.id
  name    = "@"
  value   = "hydrogen.ns.hetzner.com."
  type    = "NS"
}

Same applies to the "name" so if you put in there "www" it will auto-append domain.com in DNS Zone later.

Hope this answers your question?