Skip to content

Commit 2e10768

Browse files
authored
fix: tke - node pool instype fixed (#1237)
* fix: tke - node pool instype fixed * fix: tke endpoint - testcase dep
1 parent 9acdcd3 commit 2e10768

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

tencentcloud/basic_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,13 @@ variable "tke_cidr_c" {
635635
}
636636
`
637637

638+
const TkeDefaultNodeInstanceVar = `
639+
variable "ins_type" {
640+
default = "S5.MEDIUM4"
641+
}
642+
`
643+
644+
// @deprecated. Avoid using this because it may return diff results
638645
const TkeInstanceType = `
639646
data "tencentcloud_instance_types" "ins_type" {
640647
availability_zone = "` + defaultCvmAZone + `"

tencentcloud/resource_tc_kubernetes_cluster_endpoint_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func TestAccTencentCloudTkeClusterEndpoint(t *testing.T) {
5454
})
5555
}
5656

57-
const testAccTkeClusterEndpointBasicDeps = TkeCIDRs + TkeDataSource + ClusterAttachmentInstanceType + defaultImages + defaultSecurityGroupData + `
57+
const testAccTkeClusterEndpointBasicDeps = TkeCIDRs + TkeDataSource + TkeDefaultNodeInstanceVar + defaultImages + defaultSecurityGroupData + `
5858
variable "availability_zone" {
5959
default = "ap-guangzhou-3"
6060
}
@@ -102,7 +102,7 @@ resource "tencentcloud_kubernetes_node_pool" "np_test" {
102102
termination_policies = ["OLDEST_INSTANCE"]
103103
104104
auto_scaling_config {
105-
instance_type = local.type1
105+
instance_type = var.ins_type
106106
system_disk_type = "CLOUD_PREMIUM"
107107
system_disk_size = "50"
108108
security_group_ids = [local.sg_id]

tencentcloud/resource_tc_kubernetes_node_pool_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func testAccCheckTkeNodePoolExists(s *terraform.State) error {
202202

203203
}
204204

205-
const testAccTkeNodePoolClusterBasic = TkeDataSource + TkeInstanceType + `
205+
const testAccTkeNodePoolClusterBasic = TkeDataSource + TkeDefaultNodeInstanceVar + `
206206
variable "availability_zone" {
207207
default = "ap-guangzhou-3"
208208
}
@@ -234,7 +234,7 @@ resource "tencentcloud_kubernetes_node_pool" "np_test" {
234234
scaling_group_project_id = "` + defaultProjectId + `"
235235
236236
auto_scaling_config {
237-
instance_type = local.final_type
237+
instance_type = var.ins_type
238238
system_disk_type = "CLOUD_PREMIUM"
239239
system_disk_size = "50"
240240
security_group_ids = [data.tencentcloud_security_groups.sg.security_groups[0].security_group_id]
@@ -294,7 +294,7 @@ resource "tencentcloud_kubernetes_node_pool" "np_test" {
294294
multi_zone_subnet_policy = "EQUALITY"
295295
296296
auto_scaling_config {
297-
instance_type = local.final_type
297+
instance_type = var.ins_type
298298
system_disk_type = "CLOUD_PREMIUM"
299299
system_disk_size = "100"
300300
security_group_ids = [data.tencentcloud_security_groups.sg.security_groups[0].security_group_id]

0 commit comments

Comments
 (0)