@@ -43,7 +43,7 @@ func init() {
4343 })
4444}
4545
46- func TestAccTencentCloudElasticsearchInstance_basic (t * testing.T ) {
46+ func TestAccTencentCloudElasticsearchInstanceResource_basic (t * testing.T ) {
4747 t .Parallel ()
4848
4949 resource .Test (t , resource.TestCase {
@@ -60,7 +60,8 @@ func TestAccTencentCloudElasticsearchInstance_basic(t *testing.T) {
6060 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "version" , "7.10.1" ),
6161 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "vpc_id" , defaultVpcId ),
6262 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "subnet_id" , defaultSubnetId ),
63- resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "license_type" , "platinum" ),
63+ resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "license_type" , "basic" ),
64+ resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "basic_security_type" , "1" ),
6465 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "web_node_type_info.#" , "1" ),
6566 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "web_node_type_info.0.node_num" , "1" ),
6667 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "web_node_type_info.0.node_type" , "ES.S1.MEDIUM4" ),
@@ -76,8 +77,7 @@ func TestAccTencentCloudElasticsearchInstance_basic(t *testing.T) {
7677 Check : resource .ComposeTestCheckFunc (
7778 testAccCheckElasticsearchInstanceExists ("tencentcloud_elasticsearch_instance.foo" ),
7879 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "instance_name" , "tf-ci-test-update" ),
79- resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "license_type" , "basic" ),
80- resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "basic_security_type" , "2" ),
80+ resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "license_type" , "platinum" ),
8181 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "tags.test" , "test" ),
8282 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "web_node_type_info.0.node_num" , "1" ),
8383 resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.foo" , "web_node_type_info.0.node_type" , "ES.S1.MEDIUM8" ),
@@ -92,7 +92,7 @@ func TestAccTencentCloudElasticsearchInstance_basic(t *testing.T) {
9292 ResourceName : "tencentcloud_elasticsearch_instance.foo" ,
9393 ImportState : true ,
9494 ImportStateVerify : true ,
95- ImportStateVerifyIgnore : []string {"password" },
95+ ImportStateVerifyIgnore : []string {"password" , "basic_security_type" },
9696 },
9797 },
9898 })
@@ -172,6 +172,8 @@ resource "tencentcloud_elasticsearch_instance" "foo" {
172172 vpc_id = var.vpc_id
173173 subnet_id = var.subnet_id
174174 password = "Test1234"
175+ license_type = "basic"
176+ basic_security_type = 1
175177
176178 web_node_type_info {
177179 node_num = 1
@@ -197,8 +199,7 @@ resource "tencentcloud_elasticsearch_instance" "foo" {
197199 vpc_id = var.vpc_id
198200 subnet_id = var.subnet_id
199201 password = "Test12345"
200- license_type = "basic"
201- basic_security_type = 2
202+ license_type = "platinum"
202203
203204 web_node_type_info {
204205 node_num = 1
0 commit comments