Skip to content

fix(emr): [122437699] tencentcloud_serverless_hbase_instance change tags to Set #3233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3233.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_serverless_hbase_instance: Change `tags` from `TypeList` to `TypeSet`
```
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func ResourceTencentCloudServerlessHbaseInstance() *schema.Resource {
},

"tags": {
Type: schema.TypeList,
Type: schema.TypeSet,
Optional: true,
Description: "List of tags to bind to the instance.",
Elem: &schema.Resource{
Expand Down Expand Up @@ -195,7 +195,7 @@ func resourceTencentCloudServerlessHbaseInstanceCreate(d *schema.ResourceData, m
}

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

for _, o := range oldValue.([]interface{}) {
for _, o := range oldValue.(*schema.Set).List() {
oMap := o.(map[string]interface{})
oldMap[oMap["tag_key"].(string)] = oMap["tag_value"].(string)
}
for _, n := range newValue.([]interface{}) {
for _, n := range newValue.(*schema.Set).List() {
nMap := n.(map[string]interface{})
newMap[nMap["tag_key"].(string)] = nMap["tag_value"].(string)
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/serverless_hbase_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The following arguments are supported:
* `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.
* `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.
* `node_type` - (Optional, String) Instance node type, can be filled in as 4C16G, 8C32G, 16C64G, 32C128G, case insensitive.
* `tags` - (Optional, List) List of tags to bind to the instance.
* `tags` - (Optional, Set) List of tags to bind to the instance.
* `time_span` - (Optional, Int) Time span.
* `time_unit` - (Optional, String) Time unit, fill in m which means month.

Expand Down
Loading