Skip to content

exoscale_domain_record (Data Source)

Fetch Exoscale DNS Domain Records data.

Corresponding resource: exoscale_domain_record.

Example Usage

data "exoscale_domain" "my_domain" {
  name = "my.domain"
}

data "exoscale_domain_record" "my_exoscale_domain_A_records" {
  domain = data.exoscale_domain.my_domain.name
  filter {
    name        = "my-host"
    record_type = "A"
  }
}

data "exoscale_domain_record" "my_exoscale_domain_NS_records" {
  domain = data.exoscale_domain.my_domain.name
  filter {
    content_regex = "ns.*"
  }
}

output "my_exoscale_domain_A_records" {
  value = join("\n", formatlist(
    "%s", data.exoscale_domain_record.my_exoscale_domain_A_records.records.*.name
  ))
}

output "my_exoscale_domain_NS_records" {
  value = join("\n", formatlist(
    "%s", data.exoscale_domain_record.my_exoscale_domain_NS_records.records.*.content
  ))
}

Please refer to the examples directory for complete configuration examples.

Schema

Required

Optional

Read-Only

  • id (String) The ID of this resource.
  • records (Attributes List) The list of matching records. Structure is documented below. (see below for nested schema)

Nested Schema for filter

Optional:

  • content_regex (String) A regular expression to match the record content (conflicts with id, name and record_type).
  • id (String) The record ID to match (conflicts with name, record_type and content_regex).
  • name (String) The domain record name to match (conflicts with id and content_regex; can be combined with record_type).
  • record_type (String) The record type to match (conflicts with id and content_regex; can be combined with name).

Nested Schema for timeouts

Optional:

  • 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.

Nested Schema for records

Read-Only:

  • content (String) Content of the Record
  • domain (String) Domain of the Record
  • id (String) ID of the Record
  • name (String) Name of the Record
  • prio (Number) Priority of the Record
  • record_type (String) Type of the Record
  • ttl (Number) TTL of the Record
Last updated on