Skip to content

Commit

Permalink
fix bcc instance autorenew mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
tamperMonkeyZQ committed Jan 3, 2023
1 parent 51c2532 commit 4c99704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions baiducloud/resource_baiducloud_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ func buildBaiduCloudInstanceArgs(d *schema.ResourceData, meta interface{}) (*api
// if the field is set, then auto-renewal is effective.
if v, ok := d.GetOk("auto_renew_time_unit"); ok {
request.AutoRenewTimeUnit = v.(string)
if v, ok := d.GetOk("auto_renew_time"); ok {
if v, ok := d.GetOk("auto_renew_time_length"); ok {
request.AutoRenewTime = v.(int)
}
}
Expand Down Expand Up @@ -902,7 +902,7 @@ func buildBaiduCloudInstanceBySpecArgs(d *schema.ResourceData, meta interface{})
// if the field is set, then auto-renewal is effective.
if v, ok := d.GetOk("auto_renew_time_unit"); ok {
request.AutoRenewTimeUnit = v.(string)
if v, ok := d.GetOk("auto_renew_time"); ok {
if v, ok := d.GetOk("auto_renew_time_length"); ok {
request.AutoRenewTime = v.(int)
}
}
Expand Down

0 comments on commit 4c99704

Please sign in to comment.