Skip to content

Commit dc44b17

Browse files
committed
add
1 parent f3c57b4 commit dc44b17

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

tencentcloud/services/tke/resource_tc_kubernetes_cluster.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Provide a resource to create a kubernetes cluster.
55
~> **NOTE:** We recommend this usage that uses the `tencentcloud_kubernetes_cluster` resource to create a cluster without any `worker_config`, then adds nodes by the `tencentcloud_kubernetes_node_pool` resource.
66
It's more flexible than managing worker config directly with `tencentcloud_kubernetes_cluster`, `tencentcloud_kubernetes_scale_worker`, or existing node management of `tencentcloud_kubernetes_attachment`. The reason is that `worker_config` is unchangeable and may cause the whole cluster resource to `ForceNew`.
77

8+
~> **NOTE:** Executing `terraform destroy` to destroy the resource will default to deleting the node resource, If it is necessary to preserve node instance resources, Please set `instance_delete_mode` to `retain`.
9+
810
Example Usage
911

1012
Create a basic cluster with two worker nodes
@@ -397,7 +399,6 @@ resource "tencentcloud_kubernetes_cluster_endpoint" "example" {
397399
tencentcloud_kubernetes_node_pool.example
398400
]
399401
}
400-
401402
````
402403
403404
Use Kubelet
@@ -699,6 +700,7 @@ resource "tencentcloud_kubernetes_cluster" "test_node_pool_global_config" {
699700
```
700701

701702
Using VPC-CNI network type
703+
702704
```hcl
703705
variable "availability_zone" {
704706
default = "ap-guangzhou-1"
@@ -756,6 +758,7 @@ resource "tencentcloud_kubernetes_cluster" "managed_cluster" {
756758
```
757759

758760
Using ops options
761+
759762
```
760763
resource "tencentcloud_kubernetes_cluster" "managed_cluster" {
761764
# ...your basic fields
@@ -868,5 +871,5 @@ Import
868871
tke cluster can be imported, e.g.
869872

870873
```
871-
$ terraform import tencentcloud_kubernetes_cluster.test cls-xxx
874+
$ terraform import tencentcloud_kubernetes_cluster.example cls-n2h4jbtk
872875
```

website/docs/r/kubernetes_cluster.html.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Provide a resource to create a kubernetes cluster.
1616
~> **NOTE:** We recommend this usage that uses the `tencentcloud_kubernetes_cluster` resource to create a cluster without any `worker_config`, then adds nodes by the `tencentcloud_kubernetes_node_pool` resource.
1717
It's more flexible than managing worker config directly with `tencentcloud_kubernetes_cluster`, `tencentcloud_kubernetes_scale_worker`, or existing node management of `tencentcloud_kubernetes_attachment`. The reason is that `worker_config` is unchangeable and may cause the whole cluster resource to `ForceNew`.
1818

19+
~> **NOTE:** Executing `terraform destroy` to destroy the resource will default to deleting the node resource, If it is necessary to preserve node instance resources, Please set `instance_delete_mode` to `retain`.
20+
1921
## Example Usage
2022

2123
### Create a basic cluster with two worker nodes
@@ -1117,6 +1119,6 @@ In addition to all arguments above, the following attributes are exported:
11171119
tke cluster can be imported, e.g.
11181120

11191121
```
1120-
$ terraform import tencentcloud_kubernetes_cluster.test cls-xxx
1122+
$ terraform import tencentcloud_kubernetes_cluster.example cls-n2h4jbtk
11211123
```
11221124

0 commit comments

Comments
 (0)