Skip to main content

okustera_dns_zone (Resource)

The okustera_dns_zone resource provisions and manages an authoritative DNS zone (PRIMARY or SECONDARY) backed by OpenStack Designate and PowerDNS (pdns4) in Okustera. Upon creation, system SOA and authoritative NS recordsets (ns1.opencloud.local., ns2.opencloud.local.) are automatically initialized.

Example Usage​

resource "okustera_dns_zone" "production" {
name = "example.com."
type = "PRIMARY"
ttl = 300
description = "Production authoritative DNS zone"
}

output "zone_nameservers" {
value = okustera_dns_zone.production.nameservers
}

output "powerdns_endpoint" {
value = okustera_dns_zone.production.powerdns_endpoint
}

Schema​

Required​

  • name (String) Fully-qualified domain name (FQDN) of the DNS zone (e.g., example.com.). Automatically normalized with a trailing dot. Changing this forces a new resource to be created.

Optional​

  • email (String) Administrator email address for the zone SOA record (defaults to hostmaster@<zone>).
  • type (String) Zone type: PRIMARY or SECONDARY (defaults to PRIMARY). Changing this forces a new resource to be created.
  • ttl (Number) Default Time-To-Live (TTL) in seconds for records in this zone (60–86400, defaults to 300).
  • description (String) Human-readable description of the DNS zone.
  • vpc_id (String) Optional Tenant VPC UUID to associate with this DNS zone.

Read-Only Attributes​

  • id (String) Unique UUID of the DNS zone.
  • status (String) Provisioning status of the zone (e.g., ACTIVE).
  • serial (Number) Current SOA serial number, incremented automatically whenever recordsets change.
  • nameservers (List of String) Authoritative nameservers assigned to the zone.
  • powerdns_endpoint (String) Authoritative PowerDNS IP endpoint serving UDP/TCP port 53 queries.

Import​

Existing DNS zones can be imported using their UUID:

terraform import okustera_dns_zone.production <zone_uuid>