Skip to content

Commit

Permalink
Fix "empty non-retryable error received" error when updating IaaS nod…
Browse files Browse the repository at this point in the history
…e size (#61)
  • Loading branch information
zulh-civo committed Aug 13, 2021
1 parent 49bfe0e commit 40fc215
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions civo/resource_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func resourceInstance() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Default: "g3.xsmall",
Description: "The name of the size, from the current list, e.g. g2.small (required)",
Description: "The name of the size, from the current list, e.g. g3.xsmall",
},
"public_ip_required": {
Type: schema.TypeString,
Expand Down Expand Up @@ -365,7 +365,12 @@ func resourceInstanceUpdate(d *schema.ResourceData, m interface{}) error {
return resource.RetryableError(fmt.Errorf("[ERR] expected instance to be resizing but was in state %s", resp.Status))
}

return resource.NonRetryableError(resourceInstanceRead(d, m))
err = resourceInstanceRead(d, m)
if err != nil {
return resource.NonRetryableError(err)
}

return nil
})
}

Expand Down

0 comments on commit 40fc215

Please sign in to comment.