You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tencentcloud/services/es/resource_tc_elasticsearch_instance.go
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -470,6 +470,18 @@ func resourceTencentCloudElasticsearchInstanceCreate(d *schema.ResourceData, met
470
470
ifv, ok:=d.GetOk("protocol"); ok {
471
471
request.Protocol=helper.String(v.(string))
472
472
}
473
+
// tags - pass via CreateInstance.TagList directly instead of calling tag API afterwards.
474
+
iftags:=helper.GetTags(d, "tags"); len(tags) >0 {
475
+
tagList:=make([]*es.TagInfo, 0, len(tags))
476
+
fork, v:=rangetags {
477
+
key, value:=k, v
478
+
tagList=append(tagList, &es.TagInfo{
479
+
TagKey: &key,
480
+
TagValue: &value,
481
+
})
482
+
}
483
+
request.TagList=tagList
484
+
}
473
485
//internal version: replace reqTag begin, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
474
486
//internal version: replace reqTag end, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
475
487
instanceId:=""
@@ -670,18 +682,6 @@ func resourceTencentCloudElasticsearchInstanceCreate(d *schema.ResourceData, met
0 commit comments