Skip to content

frostmoln_dns_record (Resource)

Manages a DNS record (recordset) within a Frostmoln managed DNS zone. A recordset is one (name, type) pair with a single TTL and one or more values.

Example Usage

terraform
resource "frostmoln_dns_zone" "example" {
  name  = "example.com."
  email = "admin@example.com"
}

# An A record with two values.
resource "frostmoln_dns_record" "www" {
  zone_id = frostmoln_dns_zone.example.id
  name    = "www"
  type    = "A"
  records = ["203.0.113.10", "203.0.113.11"]
  ttl     = 300
}

# An MX record at the zone apex ("@"); the priority is part of the value.
resource "frostmoln_dns_record" "mx" {
  zone_id = frostmoln_dns_zone.example.id
  name    = "@"
  type    = "MX"
  records = ["10 mail.example.com."]
}

Schema

Required

  • name (String) The record name relative to the zone, or "@" for the zone apex. Must be lowercase.
  • records (Set of String) The record values. For MX/SRV the priority is part of the value string (e.g. "10 mail.example.com.").
  • type (String) The record type: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, or PTR.
  • zone_id (String) The ID of the zone this record belongs to.

Optional

  • comment (String) A comment for the record.
  • ttl (Number) The record TTL in seconds.

Read-Only

  • created_at (String) The creation timestamp.
  • id (String) The unique identifier of the recordset. Stable across value and TTL edits.
  • updated_at (String) The last update timestamp.