page_title | subcategory | description |
---|---|---|
tidbcloud_clusters Data Source - terraform-provider-tidbcloud |
clusters data source |
clusters data source
terraform {
required_providers {
tidbcloud = {
source = "tidbcloud/tidbcloud"
}
}
}
provider "tidbcloud" {
public_key = "fake_public_key"
private_key = "fake_private_key"
}
data "tidbcloud_clusters" "example" {
project_id = "fake_id"
}
output "output" {
value = data.tidbcloud_clusters.example
}
project_id
(String) The ID of the project
page
(Number) Default:1 The number of pages.page_size
(Number) Default:10 The size of a pages.
id
(String) data source ID.items
(Attributes List) The items of clusters in the project. (see below for nested schema)total
(Number) The total number of project clusters.
Read-Only:
cloud_provider
(String) Enum: "AWS" "GCP", The cloud provider on which your TiDB cluster is hosted.cluster_type
(String) The cluster type.config
(Attributes) The configuration of the cluster. (see below for nested schema)create_timestamp
(String) The creation time of the cluster in Unix timestamp seconds (epoch time).id
(String) The ID of the cluster.name
(String) The name of the cluster.project_id
(String) The ID of the project.region
(String) Region of the cluster.status
(Attributes) The status of the cluster. (see below for nested schema)
Read-Only:
components
(Attributes) The components of the cluster. (see below for nested schema)port
(Number) The TiDB port for connection. The port must be in the range of 1024-65535 except 10080, 4000 in default.- For a Serverless Tier cluster, only port 4000 is available.
Optional:
tiflash
(Attributes) The TiFlash component of the cluster. (see below for nested schema)
Read-Only:
tidb
(Attributes) The TiDB component of the cluster (see below for nested schema)tikv
(Attributes) The TiKV component of the cluster (see below for nested schema)
Read-Only:
node_quantity
(Number) The number of nodes in the cluster. You can get the minimum and step of a node quantity from the tidbcloud_cluster_specs datasource.- TiFlash do not support decreasing node quantity.
node_size
(String) The size of the TiFlash component in the cluster, You can get the available node size of each region from the tidbcloud_cluster_specs datasource.- Can not modify node_size of an existing cluster.
storage_size_gib
(Number) The storage size of a node in the cluster. You can get the minimum and maximum of storage size from the tidbcloud_cluster_specs datasource.- Can not modify storage_size_gib of an existing cluster.
Read-Only:
node_quantity
(Number) The number of nodes in the cluster. You can get the minimum and step of a node quantity from the tidbcloud_cluster_specs datasource.node_size
(String) The size of the TiDB component in the cluster, You can get the available node size of each region from the tidbcloud_cluster_specs datasource.- If the vCPUs of TiDB or TiKV component is 2 or 4, then their vCPUs need to be the same.
- If the vCPUs of TiDB or TiKV component is 2 or 4, then the cluster does not support TiFlash.
- Can not modify node_size of an existing cluster.
Read-Only:
node_quantity
(Number) The number of nodes in the cluster. You can get the minimum and step of a node quantity from the tidbcloud_cluster_specs datasource.- TiKV do not support decreasing node quantity.
- The node_quantity of TiKV must be a multiple of 3.
node_size
(String) The size of the TiKV component in the cluster, You can get the available node size of each region from the tidbcloud_cluster_specs datasource.- If the vCPUs of TiDB or TiKV component is 2 or 4, then their vCPUs need to be the same.
- If the vCPUs of TiDB or TiKV component is 2 or 4, then the cluster does not support TiFlash.
- Can not modify node_size of an existing cluster.
storage_size_gib
(Number) The storage size of a node in the cluster. You can get the minimum and maximum of storage size from the tidbcloud_cluster_specs datasource.- Can not modify storage_size_gib of an existing cluster.
Read-Only:
cluster_status
(String) Status of the cluster.connection_strings
(Attributes) Connection strings. (see below for nested schema)tidb_version
(String) TiDB version.
Read-Only:
default_user
(String) The default TiDB user for connection.standard
(Attributes) Standard connection string. (see below for nested schema)vpc_peering
(Attributes) VPC peering connection string. (see below for nested schema)
Read-Only:
host
(String) The host of standard connection.port
(Number) The TiDB port for connection. The port must be in the range of 1024-65535 except 10080.
Read-Only:
host
(String) The host of VPC peering connection.port
(Number) The TiDB port for connection. The port must be in the range of 1024-65535 except 10080.