equinix/terraform-provider-metal

Unassign vlan 422s are not errors

Closed this issue · 0 comments

When unassigning a VLAN, a POST 422 "not assigned" message should not be handled as an error. This is equivalent to a DELETE command returning a 404 on other resources.

Error: POST https://api.equinix.com/metal/v1/ports/a213bf05-d63d-457e-9e1d-ed201e9b12f9/unassign: 422 Virtual network 1300 not assigned 

Similarly, a 403 represents a port that is not associated with an active device. This can also be considered a successful unassignment.

Error: POST https://api.equinix.com/metal/v1/ports/a213bf05-d63d-457e-9e1d-ed201e9b12f9/unassign: 403 You are not authorized to view this resource