Skip to content

Commit f0af264

Browse files
authored
fix(emr): [122437699] tencentcloud_serverless_hbase_instance change tags to Set (#3233)
* change tags to Set * add changelog
1 parent 385d868 commit f0af264

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.changelog/3233.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_serverless_hbase_instance: Change `tags` from `TypeList` to `TypeSet`
3+
```

tencentcloud/services/emr/resource_tc_serverless_hbase_instance.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func ResourceTencentCloudServerlessHbaseInstance() *schema.Resource {
9898
},
9999

100100
"tags": {
101-
Type: schema.TypeList,
101+
Type: schema.TypeSet,
102102
Optional: true,
103103
Description: "List of tags to bind to the instance.",
104104
Elem: &schema.Resource{
@@ -195,7 +195,7 @@ func resourceTencentCloudServerlessHbaseInstanceCreate(d *schema.ResourceData, m
195195
}
196196

197197
if v, ok := d.GetOk("tags"); ok {
198-
for _, item := range v.([]interface{}) {
198+
for _, item := range v.(*schema.Set).List() {
199199
tagsMap := item.(map[string]interface{})
200200
tag := emr.Tag{}
201201
if v, ok := tagsMap["tag_key"]; ok {
@@ -415,11 +415,11 @@ func resourceTencentCloudServerlessHbaseInstanceUpdate(d *schema.ResourceData, m
415415
oldMap := make(map[string]interface{})
416416
newMap := make(map[string]interface{})
417417

418-
for _, o := range oldValue.([]interface{}) {
418+
for _, o := range oldValue.(*schema.Set).List() {
419419
oMap := o.(map[string]interface{})
420420
oldMap[oMap["tag_key"].(string)] = oMap["tag_value"].(string)
421421
}
422-
for _, n := range newValue.([]interface{}) {
422+
for _, n := range newValue.(*schema.Set).List() {
423423
nMap := n.(map[string]interface{})
424424
newMap[nMap["tag_key"].(string)] = nMap["tag_value"].(string)
425425
}

website/docs/r/serverless_hbase_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The following arguments are supported:
4646
* `zone_settings` - (Required, List) Detailed configuration of the instance availability zone, currently supports multiple availability zones, the number of availability zones can only be 1 or 3, including zone name, VPC information, and number of nodes. The total number of nodes across all zones must be greater than or equal to 3 and less than or equal to 50.
4747
* `auto_renew_flag` - (Optional, Int) AutoRenewFlag, Value range: 0: indicates NOTIFY_AND_MANUAL_RENEW; 1: indicates NOTIFY_AND_AUTO_RENEW; 2: indicates DISABLE_NOTIFY_AND_MANUAL_RENEW.
4848
* `node_type` - (Optional, String) Instance node type, can be filled in as 4C16G, 8C32G, 16C64G, 32C128G, case insensitive.
49-
* `tags` - (Optional, List) List of tags to bind to the instance.
49+
* `tags` - (Optional, Set) List of tags to bind to the instance.
5050
* `time_span` - (Optional, Int) Time span.
5151
* `time_unit` - (Optional, String) Time unit, fill in m which means month.
5252

0 commit comments

Comments
 (0)