Skip to content

Commit 8e5f91e

Browse files
authored
fix: cvm - unlimited sport charge argument (#732)
1 parent 3bcc33b commit 8e5f91e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

tencentcloud/resource_tc_instance.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -562,13 +562,9 @@ func resourceTencentCloudInstanceCreate(d *schema.ResourceData, meta interface{}
562562
request.InstanceMarketOptions.SpotOptions = &cvm.SpotMarketOptions{}
563563
if v, ok := d.GetOk("spot_instance_type"); ok {
564564
request.InstanceMarketOptions.SpotOptions.SpotInstanceType = helper.String(strings.ToLower(v.(string)))
565-
} else {
566-
return fmt.Errorf("spot_instance_type can not be empty when instance_charge_type is %s", instanceChargeType)
567565
}
568566
if v, ok := d.GetOk("spot_max_price"); ok {
569567
request.InstanceMarketOptions.SpotOptions.MaxPrice = helper.String(v.(string))
570-
} else {
571-
return fmt.Errorf("spot_max_price can not be empty when instance_charge_type is %s", instanceChargeType)
572568
}
573569
}
574570
if instanceChargeType == CVM_CHARGE_TYPE_CDHPAID {

0 commit comments

Comments
 (0)