@@ -20,6 +20,7 @@ func TestAccTencentCloudEKSCluster_basic(t *testing.T) {
20
20
{
21
21
Config : testAccEksCluster ,
22
22
Check : resource .ComposeTestCheckFunc (
23
+ testAccTencentCloudEKSClusterExists ("tencentcloud_eks_cluster.foo" ),
23
24
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "cluster_name" , "tf-eks-test" ),
24
25
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "k8s_version" , "1.18.4" ),
25
26
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "cluster_desc" , "test eks cluster created by terraform" ),
@@ -29,7 +30,7 @@ func TestAccTencentCloudEKSCluster_basic(t *testing.T) {
29
30
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "dns_servers.0.servers.0" , "10.0.0.1:80" ),
30
31
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "dns_servers.0.servers.1" , "10.0.0.1:81" ),
31
32
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 " ),
33
34
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "tags.test" , "tf" ),
34
35
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "subnet_ids.#" , "1" ),
35
36
resource .TestCheckResourceAttrSet ("tencentcloud_eks_cluster.foo" , "subnet_ids.0" ),
@@ -49,7 +50,7 @@ func TestAccTencentCloudEKSCluster_basic(t *testing.T) {
49
50
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "dns_servers.0.servers.0" , "10.0.0.1:82" ),
50
51
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "dns_servers.0.servers.1" , "10.0.0.1:83" ),
51
52
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 " ),
53
54
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "tags.test" , "tf" ),
54
55
resource .TestCheckResourceAttr ("tencentcloud_eks_cluster.foo" , "subnet_ids.#" , "1" ),
55
56
resource .TestCheckResourceAttrSet ("tencentcloud_eks_cluster.foo" , "subnet_ids.0" ),
@@ -158,7 +159,7 @@ resource "tencentcloud_eks_cluster" "foo" {
158
159
servers = ["10.0.0.1:80", "10.0.0.1:81"]
159
160
}
160
161
enable_vpc_core_dns = true
161
- need_delete_cbs = true
162
+ need_delete_cbs = false
162
163
tags = {
163
164
test = "tf"
164
165
}
@@ -180,7 +181,7 @@ resource "tencentcloud_eks_cluster" "foo" {
180
181
servers = ["10.0.0.1:82", "10.0.0.1:83"]
181
182
}
182
183
enable_vpc_core_dns = false
183
- need_delete_cbs = false
184
+ need_delete_cbs = true
184
185
tags = {
185
186
test = "tf"
186
187
}
0 commit comments