From ce8773b4ce6e997936c4ae7656137fec6327bc66 Mon Sep 17 00:00:00 2001 From: mikatong Date: Wed, 8 Jan 2025 17:39:38 +0800 Subject: [PATCH] update --- .../services/mongodb/resource_tc_mongodb_instance_params.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tencentcloud/services/mongodb/resource_tc_mongodb_instance_params.go b/tencentcloud/services/mongodb/resource_tc_mongodb_instance_params.go index e845aec16..8333e2b8c 100644 --- a/tencentcloud/services/mongodb/resource_tc_mongodb_instance_params.go +++ b/tencentcloud/services/mongodb/resource_tc_mongodb_instance_params.go @@ -142,7 +142,7 @@ func resourceTencentCloudMongodbInstanceParamsUpdate(d *schema.ResourceData, met request.InstanceId = helper.String(d.Get("instance_id").(string)) if v, ok := d.GetOk("instance_params"); ok { - for _, item := range v.([]interface{}) { + for _, item := range v.(*schema.Set).List() { instanceParamsMap := item.(map[string]interface{}) modifyMongoDBParamType := mongodb.ModifyMongoDBParamType{} if v, ok := instanceParamsMap["key"]; ok { @@ -174,7 +174,7 @@ func resourceTencentCloudMongodbInstanceParamsUpdate(d *schema.ResourceData, met } service := MongodbService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} - instanceParams := d.Get("instance_params").([]interface{}) + instanceParams := d.Get("instance_params").(*schema.Set).List() paramMap := make(map[string]string) paramNames := make([]string, 0)