File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff 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
638645const TkeInstanceType = `
639646data "tencentcloud_instance_types" "ins_type" {
640647 availability_zone = "` + defaultCvmAZone + `"
Original file line number Diff line number Diff 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 + `
5858variable "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]
Original file line number Diff line number Diff 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 + `
206206variable "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]
You can’t perform that action at this time.
0 commit comments