» alicloud_polardb_accounts

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

» Example Usage

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

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

output "ends" {
    value = "${data.alicloud_polardb_accounts.default.accounts[0].account_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 account name.

» Attributes Reference

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

  • names - Account name of the cluster.
  • accounts - A list of PolarDB cluster accounts. Each element contains the following attributes: