DnsZone
A DnsZone represents a managed DNS zone for a domain name. It contains DnsRecord entries for individual DNS records. On AWS this is a Route53 hosted zone, on GCP Cloud DNS, on Hetzner DNS, and on DigitalOcean a Domain.
Config
Section titled “Config”| Property | Type | Required | Description |
|---|---|---|---|
name |
string |
yes | Domain name (e.g. example.com) |
id |
string |
no | Explicit ID (auto-generated UUID if omitted) |
provider |
string |
no | Provider label for multi-provider configs |
tags |
Record<string, string> |
no | Arbitrary key-value metadata |
region |
string |
no | Region for the zone (provider-specific) |
Example
Section titled “Example”import { DnsZone, DnsRecord } from '@kykucloud/types'
const zone = new DnsZone({ name: 'example.com',})
const record = new DnsRecord({ name: 'www', zone: zone, recordType: 'A', ttl: 300, values: ['10.0.0.1'],})Provider Support
Section titled “Provider Support”| Provider | Supported | Backend |
|---|---|---|
| AWS | ✅ | Route53 Hosted Zone |
| GCP | ✅ | Cloud DNS Managed Zone |
| Hetzner | ✅ | DNS (separate REST API at dns.hetzner.com/api/v1) |
| DigitalOcean | ✅ | Domain |
- Hetzner DNS uses a separate REST API (
dns.hetzner.com/api/v1) authenticated viaAuth-API-Tokenheader. RequiresHETZNER_DNS_TOKENenv var — distinct from the Cloud API token. - AWS Route53 zones are globally available (not region-scoped). The zone’s name servers are provided as outputs for delegation.
- Name format: The zone
namemust be a valid domain (e.g.example.com.with trailing dot for some APIs). GCP requires lowercase.