Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Latest commit

 

History

History
46 lines (36 loc) · 1.96 KB

File metadata and controls

46 lines (36 loc) · 1.96 KB
page_title hetznerdns Provider
description This providers helps you automate management of DNS zones and records at Hetzner DNS. WARNING: This provider is deprecated as of 10 Nov 2025 with the release of the hcloud Console DNS, please migrate to the official Hetzner hcloud provider

hetznerdns Provider

This providers helps you automate management of DNS zones and records at Hetzner DNS. WARNING: This provider is deprecated as of 10 Nov 2025 with the release of the hcloud Console DNS, please migrate to the official Hetzner hcloud provider

Example Usage

provider "hetznerdns" {
  api_token = ""
}

data "hetznerdns_zone" "dns_zone" {
  name = "example.com"
}

data "hcloud_server" "web" {
  name = "web1"
}

resource "hetznerdns_record" "web" {
  zone_id = data.hetznerdns_zone.dns_zone.id
  name    = "www"
  value   = hcloud_server.web.ipv4_address
  type    = "A"
  ttl     = 60
}

Schema

Optional

  • api_token (String, Sensitive) The Hetzner DNS API token. You can pass it using the env variable HETZNER_DNS_TOKEN as well. The old env variable HETZNER_DNS_API_TOKEN is deprecated and will be removed in a future release.
  • enable_ip_validation (Boolean) Default: true Toggles the validation of IP addresses in A and AAAA records. You can pass it using the env variable HETZNER_DNS_ENABLE_IP_VALIDATION as well.
  • enable_txt_formatter (Boolean) Default: true Toggles the automatic formatter for TXT record values. Values greater than 255 bytes get split into multiple quoted chunks (RFC4408). You can pass it using the env variable HETZNER_DNS_ENABLE_TXT_FORMATTER as well.
  • max_retries (Number) Default: 1 The maximum number of retries to perform when an API request fails. You can pass it using the env variable HETZNER_DNS_MAX_RETRIES as well.