Retrieve a list of datacenters.
data "nomad_datacenters" "datacenters" {
prefix = "prod"
ignore_down_nodes = true
}
The following arguments are supported:
prefix
(string)
: An optional string to filter datacenters based on name prefix. If not provided, all datacenters are returned.ignore_down_nodes
(bool: false)
: An optional flag that, if set to true
will ignore down nodes when compiling the list of datacenters.The following attributes are exported:
datacenters
: list(string)
a list of datacenters.