Skip to content

exoscale_domain_record (Resource)

Manage Exoscale DNS Domain Records.

Corresponding data source: exoscale_domain_record.

Example Usage

resource "exoscale_domain" "my_domain" {
  name = "example.net"
}

resource "exoscale_domain_record" "my_host" {
  domain      = exoscale_domain.my_domain.id
  name        = "my-host"
  record_type = "A"
  content     = "1.2.3.4"
}

resource "exoscale_domain_record" "my_host_alias" {
  domain      = exoscale_domain.my_domain.id
  name        = "my-host-alias"
  record_type = "CNAME"
  content     = exoscale_domain_record.my_host.hostname
}

Please refer to the examples directory for complete configuration examples.

Schema

Required

  • content (String) The record value. Format follows specific record type. For example SRV record format would be <weight> <port> <target>
  • domain (String) ❗ The parent exoscale_domain to attach the record to.
  • name (String) The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
  • record_type (String) ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).

Optional

  • prio (Number) The record priority (for types that support it; minimum 0).
  • timeouts (Block, Optional) (see below for nested schema)
  • ttl (Number) The record TTL (seconds; minimum 0; default: 3600).

Read-Only

  • content_normalized (String) The normalized value of the record
  • hostname (String) The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
  • id (String) The ID of this resource.

Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • read (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).

-> The symbol ❗ in an attribute indicates that modifying it, will force the creation of a new resource.

Import

# An existing DNS domain record may be imported by `<domain-id>@<record-id>`:

terraform import \
  exoscale_domain_record.my_host \
  0a1ecf9d-99e7-40ea-83e7-1666017a2dd0@f81d4fae-7dec-11d0-a765-00a0c91e6bf6
Last updated on