DNS (kind: dns)
DNS zones and records. A single file can declare multiple independently-tagged zones.
Schema
spec.provider— optional DNS provider name (e.g.cloudflare,inwx,route53) — documentation onlyspec.zones[], each:name— the domain name (e.g.example.com)ttl— default TTL in seconds for records in this zone (default3600)records[], each{name, type, value, ttl, priority, description, notes}type—A,AAAA,CNAME,MX,TXT,SRV,NS,PTR,CAAvalue— a literal, or a${var:}/${secret:}/${feature:}/${output:STEP.KEY}/${value:kind.name.path}tokenpriority— only valid forMX/SRVrecords
configuration— raw provisioner passthroughdefault_tags/custom_tags— cloud tagscustom— free-form data
Validation
Within one zone, records are rejected if they exactly duplicate another record’s
(name, type, value), or if aCNAMEshares itsnamewith any other record (including anotherCNAME) — invalid in DNS itself, not just a strata convention. A record whosevaluestill carries an unresolved${...}token is skipped for the duplicate-value check (its real value isn’t known until build/deploy time).The same zone domain (
name) declared by two or more documents produces astrata validatewarning (dns_zone_declared_twice) — provisioning both will likely conflict depending on provider/apply order.
Example
apiVersion: strata.huybrechts.xyz/v2
kind: dns
meta:
name: example-dns
spec:
provider: cloudflare
zones:
- name: example.com
ttl: 3600
records:
- name: "@"
type: A
value: "203.0.113.1"
- name: www
type: A
value: "${var:PUBLIC_IP}"
default_tags:
environment: example
Notes
v1’s
output_keyfield (binding a record’s value to a preceding deployment stage’s provisioner output) was not ported as its own field — the same need is already met by${output:STEP.KEY}invalue, as long as the zone is claimed by an owning execution step (directly viadns_zones[], or indirectly through a claimed resource/topology — see workspace).Azure-style private DNS zones (VNet links, writing records into a pre-existing/externally-owned zone) are deliberately modeled via
configuration, not dedicated fields — see How To: Model Azure Private DNS Zones.