diff --git a/nutanix/resource_nutanix_virtual_machine.go b/nutanix/resource_nutanix_virtual_machine.go index e40d8dcec..a5dcad3bc 100644 --- a/nutanix/resource_nutanix_virtual_machine.go +++ b/nutanix/resource_nutanix_virtual_machine.go @@ -799,8 +799,8 @@ func resourceNutanixVirtualMachineCreate(d *schema.ResourceData, meta interface{ MinTimeout: 3 * time.Second, } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("error waiting for vm (%s) to create: %s", d.Id(), err) + if _, errWaitTask := stateConf.WaitForState(); errWaitTask != nil { + return fmt.Errorf("error waiting for vm (%s) to create: %s", d.Id(), errWaitTask) } //Wait for IP available