Skip to content

Commit 1d2e818

Browse files
committed
update cluster and scale_worker field description
1 parent a42266b commit 1d2e818

5 files changed

+33
-17
lines changed

tencentcloud/services/tke/resource_tc_kubernetes_cluster.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tencentcloud/services/tke/resource_tc_kubernetes_cluster.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ resource "tencentcloud_kubernetes_cluster" "example" {
9090
internet_max_bandwidth_out = 100
9191
public_ip_assigned = true
9292
subnet_id = local.first_subnet_id
93-
img_id = local.image_id
93+
# img_id = local.image_id
9494
9595
data_disk {
9696
disk_type = "CLOUD_PREMIUM"
@@ -484,7 +484,7 @@ resource "tencentcloud_kubernetes_cluster" "example" {
484484
internet_max_bandwidth_out = 100
485485
public_ip_assigned = true
486486
subnet_id = local.first_subnet_id
487-
img_id = local.image_id
487+
# img_id = local.image_id
488488
489489
data_disk {
490490
disk_type = "CLOUD_PREMIUM"
@@ -588,7 +588,7 @@ resource "tencentcloud_kubernetes_cluster" "cluster_with_addon" {
588588
internet_max_bandwidth_out = 100
589589
public_ip_assigned = true
590590
subnet_id = data.tencentcloud_vpc_subnets.vpc_first.instance_list.0.subnet_id
591-
img_id = "img-rkiynh11"
591+
# img_id = "img-rkiynh11"
592592
enhanced_security_service = false
593593
enhanced_monitor_service = false
594594
user_data = "dGVzdA=="

tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,12 @@ resource tencentcloud_kubernetes_scale_worker test_scale {
9999
password = "AABBccdd1122"
100100
}
101101
}
102+
```
103+
104+
Import
105+
106+
tke scale worker can be imported, e.g.
107+
108+
```
109+
$ terraform import tencentcloud_kubernetes_scale_worker.test cls-xxx#ins-xxx
102110
```

website/docs/r/kubernetes_cluster.html.markdown

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ resource "tencentcloud_kubernetes_cluster" "example" {
101101
internet_max_bandwidth_out = 100
102102
public_ip_assigned = true
103103
subnet_id = local.first_subnet_id
104-
img_id = local.image_id
104+
# img_id = local.image_id
105105
106106
data_disk {
107107
disk_type = "CLOUD_PREMIUM"
@@ -492,7 +492,7 @@ resource "tencentcloud_kubernetes_cluster" "example" {
492492
internet_max_bandwidth_out = 100
493493
public_ip_assigned = true
494494
subnet_id = local.first_subnet_id
495-
img_id = local.image_id
495+
# img_id = local.image_id
496496
497497
data_disk {
498498
disk_type = "CLOUD_PREMIUM"
@@ -596,10 +596,10 @@ resource "tencentcloud_kubernetes_cluster" "cluster_with_addon" {
596596
internet_max_bandwidth_out = 100
597597
public_ip_assigned = true
598598
subnet_id = data.tencentcloud_vpc_subnets.vpc_first.instance_list.0.subnet_id
599-
img_id = "img-rkiynh11"
600-
enhanced_security_service = false
601-
enhanced_monitor_service = false
602-
user_data = "dGVzdA=="
599+
# img_id = "img-rkiynh11"
600+
enhanced_security_service = false
601+
enhanced_monitor_service = false
602+
user_data = "dGVzdA=="
603603
# password = "ZZXXccvv1212" // Optional, should be set if key_ids not set.
604604
key_ids = "skey-11112222"
605605
}
@@ -816,7 +816,7 @@ The following arguments are supported:
816816
* `cluster_max_service_num` - (Optional, Int, ForceNew) The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
817817
* `cluster_name` - (Optional, String) Name of the cluster.
818818
* `cluster_os_type` - (Optional, String, ForceNew) Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
819-
* `cluster_os` - (Optional, String, ForceNew) Operating system of the cluster, the available values include: 'centos7.6.0_x64','ubuntu18.04.1x86_64','tlinux2.4x86_64'. Default is 'tlinux2.4x86_64'.
819+
* `cluster_os` - (Optional, String, ForceNew) Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
820820
* `cluster_subnet_id` - (Optional, String, ForceNew) Subnet ID of the cluster, such as: subnet-b3p7d7q5.
821821
* `cluster_version` - (Optional, String) Version of the cluster. Use `tencentcloud_kubernetes_available_cluster_versions` to get the upgradable cluster version.
822822
* `container_runtime` - (Optional, String, ForceNew) Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
@@ -847,7 +847,7 @@ The following arguments are supported:
847847
* `unschedulable` - (Optional, Int, ForceNew) Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
848848
* `upgrade_instances_follow_cluster` - (Optional, Bool) Indicates whether upgrade all instances when cluster_version change. Default is false.
849849
* `vpc_cni_type` - (Optional, String) Distinguish between shared network card multi-IP mode and independent network card mode. Fill in `tke-route-eni` for shared network card multi-IP mode and `tke-direct-eni` for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, both `eni_subnet_ids` and `vpc_cni_type` must be set to empty.
850-
* `worker_config` - (Optional, List, ForceNew) Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_worker'.
850+
* `worker_config` - (Optional, List, ForceNew) Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
851851

852852
The `auth_options` object supports the following:
853853

@@ -935,7 +935,7 @@ The `master_config` object supports the following:
935935
* `enhanced_security_service` - (Optional, Bool, ForceNew) To specify whether to enable cloud security service. Default is TRUE.
936936
* `hostname` - (Optional, String, ForceNew) The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
937937
* `hpc_cluster_id` - (Optional, String) Id of cvm hpc cluster.
938-
* `img_id` - (Optional, String) The valid image id, format of img-xxx.
938+
* `img_id` - (Optional, String) The valid image id, format of img-xxx. Note: `img_id` will be replaced with the image corresponding to TKE `cluster_os`.
939939
* `instance_charge_type_prepaid_period` - (Optional, Int, ForceNew) The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to `PREPAID`. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, `36`.
940940
* `instance_charge_type_prepaid_renew_flag` - (Optional, String, ForceNew) Auto renewal flag. Valid values: `NOTIFY_AND_AUTO_RENEW`: notify upon expiration and renew automatically, `NOTIFY_AND_MANUAL_RENEW`: notify upon expiration but do not renew automatically, `DISABLE_NOTIFY_AND_MANUAL_RENEW`: neither notify upon expiration nor renew automatically. Default value: `NOTIFY_AND_MANUAL_RENEW`. If this parameter is specified as `NOTIFY_AND_AUTO_RENEW`, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set to `PREPAID`.
941941
* `instance_charge_type` - (Optional, String, ForceNew) The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. The default is `POSTPAID_BY_HOUR`. Note: TencentCloud International only supports `POSTPAID_BY_HOUR`, `PREPAID` instance will not terminated after cluster deleted, and may not allow to delete before expired.
@@ -977,7 +977,7 @@ The `worker_config` object supports the following:
977977
* `enhanced_security_service` - (Optional, Bool, ForceNew) To specify whether to enable cloud security service. Default is TRUE.
978978
* `hostname` - (Optional, String, ForceNew) The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
979979
* `hpc_cluster_id` - (Optional, String) Id of cvm hpc cluster.
980-
* `img_id` - (Optional, String) The valid image id, format of img-xxx.
980+
* `img_id` - (Optional, String) The valid image id, format of img-xxx. Note: `img_id` will be replaced with the image corresponding to TKE `cluster_os`.
981981
* `instance_charge_type_prepaid_period` - (Optional, Int, ForceNew) The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to `PREPAID`. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, `36`.
982982
* `instance_charge_type_prepaid_renew_flag` - (Optional, String, ForceNew) Auto renewal flag. Valid values: `NOTIFY_AND_AUTO_RENEW`: notify upon expiration and renew automatically, `NOTIFY_AND_MANUAL_RENEW`: notify upon expiration but do not renew automatically, `DISABLE_NOTIFY_AND_MANUAL_RENEW`: neither notify upon expiration nor renew automatically. Default value: `NOTIFY_AND_MANUAL_RENEW`. If this parameter is specified as `NOTIFY_AND_AUTO_RENEW`, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set to `PREPAID`.
983983
* `instance_charge_type` - (Optional, String, ForceNew) The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. The default is `POSTPAID_BY_HOUR`. Note: TencentCloud International only supports `POSTPAID_BY_HOUR`, `PREPAID` instance will not terminated after cluster deleted, and may not allow to delete before expired.

website/docs/r/kubernetes_scale_worker.html.markdown

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,11 @@ In addition to all arguments above, the following attributes are exported:
200200
* `lan_ip` - LAN IP of the cvm.
201201

202202

203+
## Import
204+
205+
tke scale worker can be imported, e.g.
206+
207+
```
208+
$ terraform import tencentcloud_kubernetes_scale_worker.test cls-xxx#ins-xxx
209+
```
210+

0 commit comments

Comments
 (0)