@@ -20,6 +20,7 @@ func TestAccTencentCloudEKSCluster_basic(t *testing.T) {
2020 {
2121 Config : testAccEksCluster ,
2222 Check : resource .ComposeTestCheckFunc (
23+ testAccTencentCloudEKSClusterExists ("tencentcloud_eks_cluster.foo" ),
2324 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "cluster_name" , "tf-eks-test" ),
2425 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "k8s_version" , "1.18.4" ),
2526 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "cluster_desc" , "test eks cluster created by terraform" ),
@@ -29,7 +30,7 @@ func TestAccTencentCloudEKSCluster_basic(t *testing.T) {
2930 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "dns_servers.0.servers.0" , "10.0.0.1:80" ),
3031 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "dns_servers.0.servers.1" , "10.0.0.1:81" ),
3132 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "enable_vpc_core_dns" , "true" ),
32- resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "need_delete_cbs" , "true " ),
33+ resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "need_delete_cbs" , "false " ),
3334 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "tags.test" , "tf" ),
3435 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "subnet_ids.#" , "1" ),
3536 resource .TestCheckResourceAttrSet ("tencentcloud_eks_cluster.foo" , "subnet_ids.0" ),
@@ -49,7 +50,7 @@ func TestAccTencentCloudEKSCluster_basic(t *testing.T) {
4950 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "dns_servers.0.servers.0" , "10.0.0.1:82" ),
5051 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "dns_servers.0.servers.1" , "10.0.0.1:83" ),
5152 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "enable_vpc_core_dns" , "false" ),
52- resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "need_delete_cbs" , "false " ),
53+ resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "need_delete_cbs" , "true " ),
5354 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "tags.test" , "tf" ),
5455 resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "subnet_ids.#" , "1" ),
5556 resource .TestCheckResourceAttrSet ("tencentcloud_eks_cluster.foo" , "subnet_ids.0" ),
@@ -158,7 +159,7 @@ resource "tencentcloud_eks_cluster" "foo" {
158159 servers = ["10.0.0.1:80", "10.0.0.1:81"]
159160 }
160161 enable_vpc_core_dns = true
161- need_delete_cbs = true
162+ need_delete_cbs = false
162163 tags = {
163164 test = "tf"
164165 }
@@ -180,7 +181,7 @@ resource "tencentcloud_eks_cluster" "foo" {
180181 servers = ["10.0.0.1:82", "10.0.0.1:83"]
181182 }
182183 enable_vpc_core_dns = false
183- need_delete_cbs = false
184+ need_delete_cbs = true
184185 tags = {
185186 test = "tf"
186187 }
0 commit comments