Skip to content

Commit 39e6dc5

Browse files
authored
fix machine group (#1118)
1 parent 23d7fa7 commit 39e6dc5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

tencentcloud/resource_tc_cls_machine_group.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,11 @@ func resourceTencentCloudClsMachineGroupCreate(d *schema.ResourceData, meta inte
150150

151151
if tags := helper.GetTags(d, "tags"); len(tags) > 0 {
152152
for k, v := range tags {
153+
key := k
154+
value := v
153155
request.Tags = append(request.Tags, &cls.Tag{
154-
Key: &k,
155-
Value: &v,
156+
Key: &key,
157+
Value: &value,
156158
})
157159
}
158160
}
@@ -273,9 +275,11 @@ func resourceTencentCloudClsMachineGroupUpdate(d *schema.ResourceData, meta inte
273275
tags := d.Get("tags").(map[string]interface{})
274276
request.Tags = make([]*cls.Tag, 0, len(tags))
275277
for k, v := range tags {
278+
key := k
279+
value := v
276280
request.Tags = append(request.Tags, &cls.Tag{
277-
Key: &k,
278-
Value: helper.String(v.(string)),
281+
Key: &key,
282+
Value: helper.String(value.(string)),
279283
})
280284
}
281285
}

tencentcloud/resource_tc_cls_topic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func resourceTencentCloudClsTopicCreate(d *schema.ResourceData, meta interface{}
133133
}
134134
}
135135

136-
if v, ok := d.GetOk("max_split_partitions"); ok {
136+
if v, ok := d.GetOkExists("auto_split"); ok {
137137
request.AutoSplit = helper.Bool(v.(bool))
138138
}
139139

0 commit comments

Comments
 (0)