» alicloud_cs_kubernetes_clusters

This data source provides a list Container Service Kubernetes Clusters on Alibaba Cloud.

» Example Usage

# Declare the data source
data "alicloud_cs_kubernetes_clusters" "k8s_clusters" {
  name_regex = "my-first-k8s"
  output_file = "my-first-k8s-json"
}

output "output" {
  value = "${data.alicloud_cs_kubernetes_clusters.k8s_clusters.clusters}"
}

» Argument Reference

The following arguments are supported:

  • ids - (Optional) Cluster IDs to filter.
  • name_regex - (Optional) A regex string to filter results by cluster name.
  • output_file - (Optional) File name where to save data source results (after running terraform plan).
  • enabled_details - (Optional) Boolean, false by default, only id and name are exported. Set to true if more details are needed, e.g., master_disk_category, slb_internet_enabled, connections. See full list in attributes.

» Attributes Reference

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

  • ids - A list of matched Kubernetes clusters' ids.
  • names - A list of matched Kubernetes clusters' names.
  • clusters - A list of matched Kubernetes clusters. Each element contains the following attributes:

» Block Nodes

  • id - ID of the node.
  • name - Node name.
  • private_ip - The private IP address of node.
  • role - (Deprecated from version 1.9.4)

» Block Connections