Skip to content

Commit cb0f9d4

Browse files
committed
[bug fix for clb tags]
1. fix tag creation
1 parent 8b9dff9 commit cb0f9d4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
## 1.45.3 (Unreleased)
2+
3+
BUG FIXES:
4+
* Resource: `tencentcloud_clb_instance` fix tag creation bug.
5+
26
## 1.45.2 (October 19, 2020)
37

48
BUG FIXES:

tencentcloud/resource_tc_clb_instance.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ func resourceTencentCloudClbInstanceCreate(d *schema.ResourceData, meta interfac
287287
if tags := helper.GetTags(d, "tags"); len(tags) > 0 {
288288
tcClient := meta.(*TencentCloudClient).apiV3Conn
289289
tagService := &TagService{client: tcClient}
290-
resourceName := BuildTagResourceName("clb", "loadbalancerid", tcClient.Region, d.Id())
290+
resourceName := BuildTagResourceName("clb", "clb", tcClient.Region, d.Id())
291291
if err := tagService.ModifyTags(ctx, resourceName, tags, nil); err != nil {
292292
return err
293293
}
@@ -338,7 +338,7 @@ func resourceTencentCloudClbInstanceRead(d *schema.ResourceData, meta interface{
338338

339339
tcClient := meta.(*TencentCloudClient).apiV3Conn
340340
tagService := &TagService{client: tcClient}
341-
tags, err := tagService.DescribeResourceTags(ctx, "clb", "loadbalancerid", tcClient.Region, d.Id())
341+
tags, err := tagService.DescribeResourceTags(ctx, "clb", "clb", tcClient.Region, d.Id())
342342
if err != nil {
343343
return err
344344
}
@@ -470,7 +470,7 @@ func resourceTencentCloudClbInstanceUpdate(d *schema.ResourceData, meta interfac
470470

471471
tcClient := meta.(*TencentCloudClient).apiV3Conn
472472
tagService := &TagService{client: tcClient}
473-
resourceName := BuildTagResourceName("clb", "loadbalancerid", tcClient.Region, d.Id())
473+
resourceName := BuildTagResourceName("clb", "clb", tcClient.Region, d.Id())
474474
err := tagService.ModifyTags(ctx, resourceName, replaceTags, deleteTags)
475475
if err != nil {
476476
return err

0 commit comments

Comments
 (0)