Skip to content

Commit 546ae04

Browse files
committed
Merge remote-tracking branch 'upstream/master'
# Conflicts: # CHANGELOG.md
2 parents 0cbd449 + 328eb83 commit 546ae04

9 files changed

+58
-17
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
## 1.53.6 (Unreleased)
1+
## 1.53.8 (Unreleased)
2+
3+
ENHANCEMENTS:
4+
5+
* Resource `tencentcloud_instance` remove limit of `data_disk_size`.
6+
7+
8+
## 1.53.7 (March 09, 2021)
9+
10+
ENHANCEMENTS:
11+
12+
* Resource `tencentcloud_kubernetes_node_pool` add `internet_max_bandwidth_out`, `public_ip_assigned` to support internet traffic setting.
13+
14+
## 1.53.6 (March 09, 2021)
215

316
ENHANCEMENTS:
417
* Resource `tencentcloud_eip` support `internet_max_bandwidth_out` modification.

tencentcloud/connectivity/transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111
)
1212

13-
const ReqClient = "Terraform-v1.53.5"
13+
const ReqClient = "Terraform-v1.53.6"
1414

1515
type LogRoundTripper struct {
1616
}

tencentcloud/extension_tke.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const (
5656
TKE_CLUSTER_OS_TYPE_GENERAL = "GENERAL"
5757
)
5858

59-
var TKE_CLUSTER_OS_TYPES = []string{TKE_CLUSTER_OS_TYPE_DOCKER_CUSTOMIZE, TKE_CLUSTER_OS_TYPE_GENERAL}
59+
var TKE_CLUSTER_OS_TYPES = []string{TKE_CLUSTER_OS_TYPE_GENERAL}
6060

6161
const (
6262
TkeInternetStatusCreating = "Creating"

tencentcloud/resource_tc_instance.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,10 @@ func resourceTencentCloudInstance() *schema.Resource {
276276
Description: "Data disk type. For more information about limits on different data disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_BASIC`: HDD cloud disk, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_SSD`: SSD, `CLOUD_HSSD`: Enhanced SSD. NOTE: `LOCAL_BASIC` and `LOCAL_SSD` are deprecated.",
277277
},
278278
"data_disk_size": {
279-
Type: schema.TypeInt,
280-
Required: true,
281-
ForceNew: true,
282-
ValidateFunc: validateIntegerInRange(10, 16000),
283-
Description: "Size of the data disk, and unit is GB. If disk type is `CLOUD_SSD`, the size range is [100, 16000], and the others are [10-16000].",
279+
Type: schema.TypeInt,
280+
Required: true,
281+
ForceNew: true,
282+
Description: "Size of the data disk, and unit is GB. If disk type is `CLOUD_SSD`, the size range is [100, 16000], and the others are [10-16000].",
284283
},
285284
"data_disk_snapshot_id": {
286285
Type: schema.TypeString,

tencentcloud/resource_tc_kubernetes_cluster.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,7 @@ func resourceTencentCloudTkeCluster() *schema.Resource {
498498
Default: TKE_CLUSTER_OS_TYPE_GENERAL,
499499
ValidateFunc: validateAllowedStringValue(TKE_CLUSTER_OS_TYPES),
500500
Description: "Image type of the cluster os, the available values include: '" + strings.Join(TKE_CLUSTER_OS_TYPES, "','") +
501-
"'. Default is '" + TKE_CLUSTER_OS_TYPE_GENERAL + "'. 'DOCKER_CUSTOMIZE' means 'TKE-Optimized'. " +
502-
"Only 'centos7.6x86_64' or 'ubuntu18.04.1 LTSx86_64' support 'DOCKER_CUSTOMIZE' now.",
501+
"'. Default is '" + TKE_CLUSTER_OS_TYPE_GENERAL + ".",
503502
},
504503
"container_runtime": {
505504
Type: schema.TypeString,
@@ -603,7 +602,7 @@ func resourceTencentCloudTkeCluster() *schema.Resource {
603602
Optional: true,
604603
Default: "",
605604
Description: "Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set." +
606-
"When set to kube-proxy-bpf, cluster version greater than 1.14 and with TKE-optimized kernel is required.",
605+
"When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.",
607606
},
608607
"vpc_id": {
609608
Type: schema.TypeString,

tencentcloud/resource_tc_kubernetes_node_pool.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ resource "tencentcloud_kubernetes_node_pool" "mynodepool" {
6060
}
6161
6262
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
63+
internet_max_bandwidth_out = 10
64+
public_ip_assigned = true
6365
password = "test123#"
6466
enhanced_security_service = false
6567
enhanced_monitor_service = false
@@ -170,6 +172,19 @@ func composedKubernetesAsScalingConfigPara() map[string]*schema.Schema {
170172
ValidateFunc: validateAllowedStringValue(INTERNET_CHARGE_ALLOW_TYPE),
171173
Description: "Charge types for network traffic. Valid value: `BANDWIDTH_PREPAID`, `TRAFFIC_POSTPAID_BY_HOUR`, `TRAFFIC_POSTPAID_BY_HOUR` and `BANDWIDTH_PACKAGE`.",
172174
},
175+
"internet_max_bandwidth_out": {
176+
Type: schema.TypeInt,
177+
Optional: true,
178+
ForceNew: true,
179+
Default: 0,
180+
Description: "Max bandwidth of Internet access in Mbps. Default is `0`.",
181+
},
182+
"public_ip_assigned": {
183+
Type: schema.TypeBool,
184+
Optional: true,
185+
ForceNew: true,
186+
Description: "Specify whether to assign an Internet IP address.",
187+
},
173188
"password": {
174189
Type: schema.TypeString,
175190
Optional: true,
@@ -474,6 +489,13 @@ func comosedKubernetesAsScalingConfigParaSerial(dMap map[string]interface{}, met
474489
if v, ok := dMap["internet_charge_type"]; ok {
475490
request.InternetAccessible.InternetChargeType = helper.String(v.(string))
476491
}
492+
if v, ok := dMap["internet_max_bandwidth_out"]; ok {
493+
request.InternetAccessible.InternetMaxBandwidthOut = helper.IntUint64(v.(int))
494+
}
495+
if v, ok := dMap["public_ip_assigned"]; ok {
496+
publicIpAssigned := v.(bool)
497+
request.InternetAccessible.PublicIpAssigned = &publicIpAssigned
498+
}
477499

478500
request.LoginSettings = &as.LoginSettings{}
479501

tencentcloud/resource_tc_kubernetes_node_pool_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ resource "tencentcloud_kubernetes_node_pool" "np_test" {
200200
}
201201
202202
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
203+
internet_max_bandwidth_out = 10
204+
public_ip_assigned = true
203205
password = "test123#"
204206
enhanced_security_service = false
205207
enhanced_monitor_service = false
@@ -252,6 +254,8 @@ resource "tencentcloud_kubernetes_node_pool" "np_test" {
252254
}
253255
254256
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
257+
internet_max_bandwidth_out = 10
258+
public_ip_assigned = true
255259
password = "test123#"
256260
enhanced_security_service = false
257261
enhanced_monitor_service = false

website/docs/r/kubernetes_cluster.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ The following arguments are supported:
220220
* `cluster_max_pod_num` - (Optional, ForceNew) The maximum number of Pods per node in the cluster. Default is 256. Must be a multiple of 16 and large than 32.
221221
* `cluster_max_service_num` - (Optional, ForceNew) The maximum number of services in the cluster. Default is 256. Must be a multiple of 16.
222222
* `cluster_name` - (Optional) Name of the cluster.
223-
* `cluster_os_type` - (Optional, ForceNew) Image type of the cluster os, the available values include: 'DOCKER_CUSTOMIZE','GENERAL'. Default is 'GENERAL'. 'DOCKER_CUSTOMIZE' means 'TKE-Optimized'. Only 'centos7.6x86_64' or 'ubuntu18.04.1 LTSx86_64' support 'DOCKER_CUSTOMIZE' now.
223+
* `cluster_os_type` - (Optional, ForceNew) Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL.
224224
* `cluster_os` - (Optional, ForceNew) Operating system of the cluster, the available values include: 'centos7.2x86_64','centos7.6x86_64','ubuntu16.04.1 LTSx86_64','ubuntu18.04.1 LTSx86_64','tlinux2.4x86_64'. Default is 'ubuntu16.04.1 LTSx86_64'.
225225
* `cluster_version` - (Optional) Version of the cluster, Default is '1.10.5'.
226226
* `container_runtime` - (Optional, ForceNew) Runtime type of the cluster, the available values include: 'docker' and 'containerd'. Default is 'docker'.
@@ -230,7 +230,7 @@ The following arguments are supported:
230230
* `extra_args` - (Optional, ForceNew) Custom parameter information related to the node.
231231
* `ignore_cluster_cidr_conflict` - (Optional, ForceNew) Indicates whether to ignore the cluster cidr conflict error. Default is false.
232232
* `is_non_static_ip_mode` - (Optional, ForceNew) Indicates whether static ip mode is enabled. Default is false.
233-
* `kube_proxy_mode` - (Optional) Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with TKE-optimized kernel is required.
233+
* `kube_proxy_mode` - (Optional) Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
234234
* `labels` - (Optional, ForceNew) Labels of tke cluster nodes.
235235
* `managed_cluster_internet_security_policies` - (Optional) Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when field `cluster_deploy_type` is 'MANAGED_CLUSTER' and `cluster_internet` is true. `managed_cluster_internet_security_policies` can not delete or empty once be set.
236236
* `master_config` - (Optional, ForceNew) Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.

website/docs/r/kubernetes_node_pool.html.markdown

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ resource "tencentcloud_kubernetes_node_pool" "mynodepool" {
6868
disk_size = 50
6969
}
7070
71-
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
72-
password = "test123#"
73-
enhanced_security_service = false
74-
enhanced_monitor_service = false
71+
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
72+
internet_max_bandwidth_out = 10
73+
public_ip_assigned = true
74+
password = "test123#"
75+
enhanced_security_service = false
76+
enhanced_monitor_service = false
7577
7678
}
7779
@@ -129,8 +131,10 @@ The `auto_scaling_config` object supports the following:
129131
* `enhanced_monitor_service` - (Optional, ForceNew) To specify whether to enable cloud monitor service. Default is TRUE.
130132
* `enhanced_security_service` - (Optional, ForceNew) To specify whether to enable cloud security service. Default is TRUE.
131133
* `internet_charge_type` - (Optional, ForceNew) Charge types for network traffic. Valid value: `BANDWIDTH_PREPAID`, `TRAFFIC_POSTPAID_BY_HOUR`, `TRAFFIC_POSTPAID_BY_HOUR` and `BANDWIDTH_PACKAGE`.
134+
* `internet_max_bandwidth_out` - (Optional, ForceNew) Max bandwidth of Internet access in Mbps. Default is `0`.
132135
* `key_ids` - (Optional, ForceNew) ID list of keys.
133136
* `password` - (Optional, ForceNew) Password to access.
137+
* `public_ip_assigned` - (Optional, ForceNew) Specify whether to assign an Internet IP address.
134138
* `security_group_ids` - (Optional, ForceNew) Security groups to which a CVM instance belongs.
135139
* `system_disk_size` - (Optional, ForceNew) Volume of system disk in GB. Default is `50`.
136140
* `system_disk_type` - (Optional, ForceNew) Type of a CVM disk. Valid value: `CLOUD_PREMIUM` and `CLOUD_SSD`. Default is `CLOUD_PREMIUM`.

0 commit comments

Comments
 (0)