@@ -249,6 +249,28 @@ func TestAccTencentCloudElasticsearchInstanceResource_https(t *testing.T) {
249249 },
250250 })
251251}
252+ func TestAccTencentCloudElasticsearchInstanceResource_httpTohttps (t * testing.T ) {
253+ resource .Test (t , resource.TestCase {
254+ PreCheck : func () { tcacctest .AccPreCheck (t ) },
255+ Providers : tcacctest .AccProviders ,
256+ CheckDestroy : testAccCheckElasticsearchInstanceDestroy ,
257+ Steps : []resource.TestStep {
258+ {
259+ Config : testAccElasticsearchInstanceKibanaPublicAccessHttp ,
260+ Check : resource .ComposeTestCheckFunc (
261+ testAccCheckElasticsearchInstanceExists ("tencentcloud_elasticsearch_instance.es_kibana" ),
262+ ),
263+ },
264+ {
265+ Config : testAccElasticsearchInstanceKibanaPublicAccessHttps ,
266+ Check : resource .ComposeTestCheckFunc (
267+ testAccCheckElasticsearchInstanceExists ("tencentcloud_elasticsearch_instance.es_kibana" ),
268+ resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.es_kibana" , "protocol" , "https" ),
269+ ),
270+ },
271+ },
272+ })
273+ }
252274
253275func TestAccTencentCloudElasticsearchInstanceResource_nodeInfoList (t * testing.T ) {
254276 resource .Test (t , resource.TestCase {
@@ -274,6 +296,23 @@ func TestAccTencentCloudElasticsearchInstanceResource_nodeInfoList(t *testing.T)
274296 })
275297}
276298
299+ func TestAccTencentCloudElasticsearchInstanceResource_nodeInfoListIO (t * testing.T ) {
300+ resource .Test (t , resource.TestCase {
301+ PreCheck : func () { tcacctest .AccPreCheck (t ) },
302+ Providers : tcacctest .AccProviders ,
303+ CheckDestroy : testAccCheckElasticsearchInstanceDestroy ,
304+ Steps : []resource.TestStep {
305+ {
306+ Config : testAccElasticsearchInstanceNodeInfoListIO ,
307+ Check : resource .ComposeTestCheckFunc (
308+ testAccCheckElasticsearchInstanceExists ("tencentcloud_elasticsearch_instance.es_node_info_list" ),
309+ resource .TestCheckResourceAttr ("tencentcloud_elasticsearch_instance.es_node_info_list" , "node_info_list.#" , "2" ),
310+ ),
311+ },
312+ },
313+ })
314+ }
315+
277316func TestAccTencentCloudElasticsearchInstanceResource_MultiZoneInfo (t * testing.T ) {
278317 resource .Test (t , resource.TestCase {
279318 PreCheck : func () { tcacctest .AccPreCheck (t ) },
@@ -594,6 +633,34 @@ resource "tencentcloud_elasticsearch_instance" "es_kibana" {
594633 }
595634 }
596635`
636+ const testAccElasticsearchInstanceKibanaPublicAccessHttp = tcacctest .DefaultEsVariables + `
637+ resource "tencentcloud_elasticsearch_instance" "es_kibana" {
638+ instance_name = "tf-ci-test-kibana"
639+ availability_zone = var.availability_zone
640+ version = "7.10.1"
641+ vpc_id = var.vpc_id
642+ subnet_id = var.subnet_id
643+ password = "Test1234"
644+ license_type = "basic"
645+ basic_security_type = 2
646+ public_access = "OPEN"
647+ es_acl {
648+ white_list = [
649+ "127.0.0.2"
650+ ]
651+ }
652+ es_public_acl {
653+ white_ip_list = [
654+ "127.0.0.2"
655+ ]
656+ }
657+
658+ node_info_list {
659+ node_num = 2
660+ node_type = "ES.S1.MEDIUM4"
661+ }
662+ }
663+ `
597664
598665const testAccElasticsearchInstanceKibanaPublicAccessHttps = tcacctest .DefaultEsVariables + `
599666resource "tencentcloud_elasticsearch_instance" "es_kibana" {
@@ -625,7 +692,7 @@ resource "tencentcloud_elasticsearch_instance" "es_kibana" {
625692 }
626693`
627694
628- const testAccElasticsearchInstanceNodeInfoList = tcacctest .DefaultEsVariables + `
695+ const testAccElasticsearchInstanceNodeInfoListIO = tcacctest .DefaultEsVariables + `
629696resource "tencentcloud_elasticsearch_instance" "es_node_info_list" {
630697 instance_name = "tf-ci-test-node"
631698 availability_zone = var.availability_zone
@@ -650,9 +717,54 @@ resource "tencentcloud_elasticsearch_instance" "es_node_info_list" {
650717
651718 node_info_list {
652719 node_num = 2
720+ node_type = "ES.I1.4XLARGE64"
721+ type = "hotData"
722+ }
723+
724+ node_info_list {
725+ node_num = 3
653726 node_type = "ES.S1.MEDIUM4"
654727 disk_size = 50
728+ type = "dedicatedMaster"
729+ disk_type = "CLOUD_SSD"
730+ }
731+ }
732+ `
733+
734+ const testAccElasticsearchInstanceNodeInfoList = tcacctest .DefaultEsVariables + `
735+ resource "tencentcloud_elasticsearch_instance" "es_node_info_list" {
736+ instance_name = "tf-ci-test-node"
737+ availability_zone = var.availability_zone
738+ version = "7.10.1"
739+ vpc_id = var.vpc_id
740+ subnet_id = var.subnet_id
741+ password = "Test1234"
742+ license_type = "basic"
743+ basic_security_type = 2
744+ public_access = "OPEN"
745+ protocol = "https"
746+ es_acl {
747+ white_list = [
748+ "127.0.0.2"
749+ ]
750+ }
751+ es_public_acl {
752+ white_ip_list = [
753+ "127.0.0.2"
754+ ]
755+ }
756+
757+ node_info_list {
758+ node_num = 2
759+ node_type = "ES.I1.4XLARGE64"
655760 type = "hotData"
761+ }
762+
763+ node_info_list {
764+ node_num = 3
765+ node_type = "ES.S1.MEDIUM4"
766+ disk_size = 50
767+ type = "dedicatedMaster"
656768 disk_type = "CLOUD_SSD"
657769 }
658770 }
0 commit comments