Skip to content

Commit 2a8fc03

Browse files
authored
Merge pull request #651 from Kagashino/master
fix: skip kibana node info after elastic search instance create
2 parents e58d029 + be47f01 commit 2a8fc03

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tencentcloud/data_source_tc_elasticsearch_instances.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ func dataSourceTencentCloudElasticsearchInstancesRead(d *schema.ResourceData, me
270270
if instance.NodeInfoList != nil && len(instance.NodeInfoList) > 0 {
271271
infos := make([]map[string]interface{}, 0, len(instance.NodeInfoList))
272272
for _, v := range instance.NodeInfoList {
273+
// this will not keep longer as long as cloud api response update
274+
if *v.Type == "kibana" {
275+
continue
276+
}
273277
info := map[string]interface{}{
274278
"node_num": v.NodeNum,
275279
"node_type": v.NodeType,

tencentcloud/resource_tc_elasticsearch_instance.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,10 @@ func resourceTencentCloudElasticsearchInstanceRead(d *schema.ResourceData, meta
461461

462462
nodeInfoList := make([]map[string]interface{}, 0, len(instance.NodeInfoList))
463463
for _, item := range instance.NodeInfoList {
464+
// this will not keep longer as long as cloud api response update
465+
if *item.Type == "kibana" {
466+
continue
467+
}
464468
info := make(map[string]interface{}, 5)
465469
info["node_num"] = item.NodeNum
466470
info["node_type"] = item.NodeType

0 commit comments

Comments
 (0)