-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
34 changed files
with
972 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,5 @@ website/vendor | |
|
||
# Keep windows files with windows line endings | ||
*.winfile eol=crlf | ||
|
||
test.tf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "tidbcloud_clusters Data Source - terraform-provider-tidbcloud" | ||
subcategory: "" | ||
description: |- | ||
clusters data source | ||
--- | ||
|
||
# tidbcloud_clusters (Data Source) | ||
|
||
clusters data source | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
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 | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `project_id` (String) The ID of the project | ||
|
||
### Optional | ||
|
||
- `page` (Number) Default:1 The number of pages. | ||
- `page_size` (Number) Default:10 The size of a pages. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) data source ID. | ||
- `items` (Attributes List) The items of clusters in the project. (see [below for nested schema](#nestedatt--items)) | ||
- `total` (Number) The total number of project clusters. | ||
|
||
<a id="nestedatt--items"></a> | ||
### Nested Schema for `items` | ||
|
||
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](#nestedatt--items--config)) | ||
- `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](#nestedatt--items--status)) | ||
|
||
<a id="nestedatt--items--config"></a> | ||
### Nested Schema for `items.config` | ||
|
||
Read-Only: | ||
|
||
- `components` (Attributes) The components of the cluster. (see [below for nested schema](#nestedatt--items--config--components)) | ||
- `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. | ||
|
||
<a id="nestedatt--items--config--components"></a> | ||
### Nested Schema for `items.config.components` | ||
|
||
Optional: | ||
|
||
- `tiflash` (Attributes) The TiFlash component of the cluster. (see [below for nested schema](#nestedatt--items--config--components--tiflash)) | ||
|
||
Read-Only: | ||
|
||
- `tidb` (Attributes) The TiDB component of the cluster (see [below for nested schema](#nestedatt--items--config--components--tidb)) | ||
- `tikv` (Attributes) The TiKV component of the cluster (see [below for nested schema](#nestedatt--items--config--components--tikv)) | ||
|
||
<a id="nestedatt--items--config--components--tiflash"></a> | ||
### Nested Schema for `items.config.components.tikv` | ||
|
||
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](../data-sources/cluster_specs.md). | ||
- 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](../data-sources/cluster_specs.md). | ||
- 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](../data-sources/cluster_specs.md). | ||
- Can not modify storage_size_gib of an existing cluster. | ||
|
||
|
||
<a id="nestedatt--items--config--components--tidb"></a> | ||
### Nested Schema for `items.config.components.tikv` | ||
|
||
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](../data-sources/cluster_specs.md). | ||
- `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](../data-sources/cluster_specs.md). | ||
- 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. | ||
|
||
|
||
<a id="nestedatt--items--config--components--tikv"></a> | ||
### Nested Schema for `items.config.components.tikv` | ||
|
||
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](../data-sources/cluster_specs.md). | ||
- 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](../data-sources/cluster_specs.md). | ||
- 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](../data-sources/cluster_specs.md). | ||
- Can not modify storage_size_gib of an existing cluster. | ||
|
||
|
||
|
||
|
||
<a id="nestedatt--items--status"></a> | ||
### Nested Schema for `items.status` | ||
|
||
Read-Only: | ||
|
||
- `cluster_status` (String) Status of the cluster. | ||
- `connection_strings` (Attributes) Connection strings. (see [below for nested schema](#nestedatt--items--status--connection_strings)) | ||
- `tidb_version` (String) TiDB version. | ||
|
||
<a id="nestedatt--items--status--connection_strings"></a> | ||
### Nested Schema for `items.status.connection_strings` | ||
|
||
Read-Only: | ||
|
||
- `default_user` (String) The default TiDB user for connection. | ||
- `standard` (Attributes) Standard connection string. (see [below for nested schema](#nestedatt--items--status--connection_strings--standard)) | ||
- `vpc_peering` (Attributes) VPC peering connection string. (see [below for nested schema](#nestedatt--items--status--connection_strings--vpc_peering)) | ||
|
||
<a id="nestedatt--items--status--connection_strings--standard"></a> | ||
### Nested Schema for `items.status.connection_strings.vpc_peering` | ||
|
||
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. | ||
|
||
|
||
<a id="nestedatt--items--status--connection_strings--vpc_peering"></a> | ||
### Nested Schema for `items.status.connection_strings.vpc_peering` | ||
|
||
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. | ||
|
||
|
Oops, something went wrong.