» alicloud_gpdb_instances

The alicloud_gpdb_instances data source provides a collection of AnalyticDB for PostgreSQL instances available in Alicloud account. Filters support regular expression for the instance name or availability_zone.

» Example Usage

data "alicloud_gpdb_instances" "gpdb" {
  availability_zone = "cn-beijing-c"
  name_regex        = "gp-.+\\d+"
  output_file       = "instances.txt"
}

output "instance_id" {
  value = "${data.alicloud_gpdb_instances.gpdb.instances.0.id}"
}

» Argument Reference

The following arguments are supported:

  • ids - (Optional) A list of instance IDs.
  • name_regex - (Optional) A regex string to apply to the instance name.
  • availability_zone - (Optional) Instance availability zone.
  • vswitch_id - (Optional) Used to retrieve instances belong to specified vswitch resources.
  • output_file - (Optional) The name of file that can save the collection of instances after running terraform plan.

» Attributes Reference

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

  • ids - The ids list of AnalyticDB for PostgreSQL instances.
  • names - The names list of AnalyticDB for PostgreSQL instance.
  • instances - A list of AnalyticDB for PostgreSQL instances. Its every element contains the following attributes: