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

Read-Only

  • id (String) The ID of this resource.
  • records (List of Object) 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.
  • id (String) The record ID to match.
  • name (String) The domain record name to match.
  • record_type (String) The record type to match.

Nested Schema for records

Read-Only:

  • content (String)
  • domain (String)
  • id (String)
  • name (String)
  • prio (Number)
  • record_type (String)
  • ttl (Number)