digitalocean_records

Retrieve information about all DNS records within a domain, with the ability to filter and sort the results. If no filters are specified, all records will be returned.

Example Usage

Get data for all MX records in a domain:

data "digitalocean_records" "example" {
  domain = "example.com"
  filter {
    key    = "type"
    values = ["MX"]
  }
}

output "mail_servers" {
  value = join(",", data.digitalocean_records.example.records[*].value)
}

Argument Reference

The following arguments are supported:

filter supports the following arguments:

sort supports the following arguments:

Attributes Reference

The following attributes are exported: