digitalocean_domains

Get information on domains for use in other resources, with the ability to filter and sort the results. If no filters are specified, all domains will be returned.

This data source is useful if the domains in question are not managed by Terraform or you need to utilize any of the domains' data.

Note: You can use the digitalocean_domain data source to obtain metadata about a single domain if you already know the name.

Example Usage

Use the filter block with a key string and values list to filter domains. (This example also uses the regular expression match_by mode in order to match domains by suffix.)

data "digitalocean_domains" "examples" {
  filter {
    key      = "name"
    values   = ["example\\.com$"]
    match_by = "re"
  }
}

Argument Reference

filter supports the following arguments:

sort supports the following arguments:

Attributes Reference