OpenMCF logoOpenMCF

Loading...

OpenStack DNS Record

Deploys a standalone DNS recordset in an OpenStack Designate zone with a configurable name, type, values, and TTL. Use this component when individual DNS records need to be independently managed or wired as explicit dependencies in InfraCharts; for managing all records within a single component, use the inline records feature of OpenStackDnsZone instead.

What Gets Created

When you deploy an OpenStackDnsRecord resource, OpenMCF provisions:

  • DNS RecordSet — an openstack_dns_recordset_v2 resource in the specified Designate zone. The recordset contains one fully qualified domain name, one record type, and one or more values. Multiple values in the same recordset produce a round-robin record set.

Prerequisites

  • OpenStack credentials configured via environment variables or OpenMCF provider config
  • An existing Designate DNS zone — provide the zone UUID directly or reference an OpenStackDnsZone resource via valueFrom
  • Designate DNS service enabled in the target OpenStack project

Quick Start

Create a file dns-record.yaml:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackDnsRecord
metadata:
  name: my-a-record
  labels:
    openmcf.org/provisioner: pulumi
    openmcf.org/stack.jobId: dev.OpenstackDnsRecord.my-a-record
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackdnsrecord/v1/iac/pulumi/module
spec:
  zoneId: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d
  recordName: "www.example.com."
  type: A
  values:
    - "192.0.2.1"

Deploy:

openmcf apply -f dns-record.yaml

This creates an A record for www.example.com. pointing to 192.0.2.1 in the specified Designate zone.

Configuration Reference

Required Fields

FieldTypeDescriptionValidation
zoneIdStringValueOrRefThe ID (UUID) of the Designate zone where this record will be created. Can reference an OpenStackDnsZone resource via valueFrom. ForceNew: changing this recreates the record.Required
recordNamestringFully qualified domain name for this record. Must end with a trailing dot (e.g., www.example.com.). ForceNew: changing this recreates the record.Must be a valid DNS name ending with .
typeRecordTypeDNS record type. Supported values: A, AAAA, CNAME, MX, TXT, SRV, NS, PTR, CAA, SOA, SPF, SSHFP, NAPTR. ForceNew: changing this recreates the record.Must be a defined enum value; cannot be unspecified
valuesstring[]DNS record values. Format depends on record type (see examples below). Multiple values create a round-robin record set.Minimum 1 item

Optional Fields

FieldTypeDefaultDescription
ttlint32zone defaultTime To Live in seconds. Determines how long resolvers cache this record. If omitted, the zone's default TTL is used.
descriptionstring—Human-readable description of the DNS record.
regionstringprovider defaultOverride the region from the provider config for this record. ForceNew: changing this recreates the record.

Examples

A Record with Custom TTL

A single IPv4 address record with a 5-minute TTL:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackDnsRecord
metadata:
  name: web-a-record
  labels:
    openmcf.org/provisioner: pulumi
    openmcf.org/stack.jobId: dev.OpenstackDnsRecord.web-a-record
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackdnsrecord/v1/iac/pulumi/module
spec:
  zoneId: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d
  recordName: "web.example.com."
  type: A
  values:
    - "192.0.2.10"
    - "192.0.2.11"
  ttl: 300
  description: "Round-robin A records for the web tier"

CNAME Record

An alias record pointing a subdomain to another hostname:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackDnsRecord
metadata:
  name: docs-cname
  labels:
    openmcf.org/provisioner: pulumi
    openmcf.org/stack.jobId: prod.OpenstackDnsRecord.docs-cname
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackdnsrecord/v1/iac/pulumi/module
spec:
  zoneId: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d
  recordName: "docs.example.com."
  type: CNAME
  values:
    - "lb.example.com."
  ttl: 3600

MX Records for Mail Delivery

Mail exchange records with priority values for primary and backup mail servers:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackDnsRecord
metadata:
  name: mail-mx
  labels:
    openmcf.org/provisioner: pulumi
    openmcf.org/stack.jobId: prod.OpenstackDnsRecord.mail-mx
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackdnsrecord/v1/iac/pulumi/module
spec:
  zoneId: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d
  recordName: "example.com."
  type: MX
  values:
    - "10 mail1.example.com."
    - "20 mail2.example.com."
  ttl: 3600
  description: "Primary and backup mail servers"

Using Foreign Key References

Reference an OpenMCF-managed DNS zone instead of hardcoding the zone UUID:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackDnsRecord
metadata:
  name: api-record
  labels:
    openmcf.org/provisioner: pulumi
    openmcf.org/stack.jobId: prod.OpenstackDnsRecord.api-record
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackdnsrecord/v1/iac/pulumi/module
spec:
  zoneId:
    valueFrom:
      kind: OpenStackDnsZone
      name: my-zone
      field: status.outputs.zone_id
  recordName: "api.example.com."
  type: A
  values:
    - "10.0.1.100"
  ttl: 60
  description: "API endpoint for the example.com zone"

Stack Outputs

After deployment, the following outputs are available in status.outputs:

OutputTypeDescription
recordset_idstringUUID of the created DNS recordset
fqdnstringFully qualified domain name of the created DNS record (e.g., www.example.com.)
record_typestringDNS record type that was created (e.g., A, CNAME, MX)
valuesstring[]List of DNS record values that were set
zone_idstringID of the Designate zone containing this record
regionstringOpenStack region where the record was created

Related Components

  • OpenStackDnsZone — provides the Designate zone where records are created; also supports inline records for simpler setups

Next article

OpenStack DNS Zone

OpenStack DNS Zone Deploys an OpenStack Designate DNS zone with configurable zone type (PRIMARY or SECONDARY), SOA email, TTL, optional master nameservers for zone transfers, and optional inline DNS record sets provisioned alongside the zone. What Gets Created When you deploy an OpenStackDnsZone resource, OpenMCF provisions: DNS Zone — an openstackdnszonev2 resource representing an authoritative domain in OpenStack Designate. The zone can be PRIMARY (Designate is the authoritative source) or...
Read next article
Presets
2 ready-to-deploy configurationsView presets →