Skip to content

Improve error handling on incorrect API calls #112

Closed
@yannickstruyf3

Description

When performing 'incorrect' API calls via the terraform provider, the "status" field on the API is being set to "error". Trying to shrink disks will cause this state.

This state makes it impossible to use Terraform afterwards.

The only way of getting the VM out of error state is the following:

  • Retrieve the UUID of the virtual machine (should be in your statefile)
  • Perform a GET request on https://<< Prism IP >>:9440/api/nutanix/v3/vms/<< VM UUID >>
  • Take the output, remove the “status” key from the JSON
  • Perform a PUT request using the retrieved payload on https://<< Prism IP >>:9440/api/nutanix/v3/vms/<< VM UUID >>

Improving error handling should resolve this issue.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions