From b328715c5b3229f7566a3939112edea8ad318b6e Mon Sep 17 00:00:00 2001 From: Yanghao LUO Date: Wed, 12 Jun 2024 18:42:48 +0800 Subject: [PATCH] fix: tencentcloud_cvm_reboot_instance and tencentcloud_cvm_launch_template_default_version --- .../cvm/resource_tc_cvm_launch_template_default_version.go | 2 +- .../services/cvm/resource_tc_cvm_reboot_instance.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tencentcloud/services/cvm/resource_tc_cvm_launch_template_default_version.go b/tencentcloud/services/cvm/resource_tc_cvm_launch_template_default_version.go index 2fdf3fe5d6..1baadfd38f 100644 --- a/tencentcloud/services/cvm/resource_tc_cvm_launch_template_default_version.go +++ b/tencentcloud/services/cvm/resource_tc_cvm_launch_template_default_version.go @@ -80,7 +80,7 @@ func resourceTencentCloudCvmLaunchTemplateDefaultVersionRead(d *schema.ResourceD return nil } if respData.LaunchTemplateVersion != nil { - _ = d.Set("launch_template_version", respData.LaunchTemplateVersion) + _ = d.Set("default_version", respData.LaunchTemplateVersion) } return nil diff --git a/tencentcloud/services/cvm/resource_tc_cvm_reboot_instance.go b/tencentcloud/services/cvm/resource_tc_cvm_reboot_instance.go index 3dd0d36e76..ac03c6c12c 100644 --- a/tencentcloud/services/cvm/resource_tc_cvm_reboot_instance.go +++ b/tencentcloud/services/cvm/resource_tc_cvm_reboot_instance.go @@ -67,11 +67,7 @@ func resourceTencentCloudCvmRebootInstanceCreate(d *schema.ResourceData, meta in } if v, ok := d.GetOk("instance_id"); ok { - instanceIdsSet := v.(*schema.Set).List() - for i := range instanceIdsSet { - instanceIds := instanceIdsSet[i].(string) - request.InstanceIds = append(request.InstanceIds, helper.String(instanceIds)) - } + request.InstanceIds = []*string{helper.String(v.(string))} } if v, ok := d.GetOkExists("force_reboot"); ok {