Skip to content

Commit

Permalink
Merge branch 'master' into fix/clbListener
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyaming0800 authored Apr 24, 2023
2 parents c2651c8 + 1d620d1 commit b4acbc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func EcsInstanceImportDiffSuppress(k, old, new string, d *schema.ResourceData) b
return true
}

if d.Get("instance_charge_type").(string) == "PostPaid" && (k == "period" || k == "period_unit" || k == "auto_renew" || k == "auto_renew_period") {
if d.Get("instance_charge_type").(string) == "PostPaid" && (k == "period" || k == "period_unit") {
return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,12 @@ func (s *VolcengineEcsService) CreateResource(resourceData *schema.ResourceData,
(*call.SdkParam)["Volumes.1.DeleteWithInstance"] = true
(*call.SdkParam)["Count"] = 1

if (*call.SdkParam)["InstanceChargeType"] != "PrePaid" {
delete(*call.SdkParam, "AutoRenew")
delete(*call.SdkParam, "AutoRenewPeriod")
delete(*call.SdkParam, "Period")
}

if _, ok := (*call.SdkParam)["ZoneId"]; !ok || (*call.SdkParam)["ZoneId"] == "" {
var (
vnet map[string]interface{}
Expand Down

0 comments on commit b4acbc3

Please sign in to comment.