» alicloud_polardb_databases

The alicloud_polardb_databases data source provides a collection of PolarDB cluster database available in Alibaba Cloud account. Filters support regular expression for the database name, searches by clusterId.

» Example Usage

data "alicloud_polardb_clusters" "polardb_clusters_ds" {
  description_regex = "pc-\\w+"
  status     = "Running"
}

data "alicloud_polardb_databases" "default" {
  db_cluster_id    = "${data.alicloud_polardb_clusters.polardb_clusters_ds.clusters.0.id}"
}

output "ends" {
    value = "${data.alicloud_polardb_databases.default.databases[0].db_name}"
}

» Argument Reference

The following arguments are supported:

  • db_cluster_id - (Required) The polarDB cluster ID.
  • name_regex - (Optional) A regex string to filter results by database name.

» Attributes Reference

The following attributes are exported in addition to the arguments listed above: