equinix/terraform-provider-equinix

When deleting Metal Gateway 404 is seen as error instead of success

Opened this issue ยท 1 comments

When deleting Metal Gateway 404 is seen as error instead of success

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform Version

Affected Resource(s)

  • equinix_metal_gateway

Terraform Configuration Files

# Copy-paste your Terraform configurations here.
#
# For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file.
#
# If reproducing the bug involves modifying the config file (e.g., apply a config,
# change a value, apply the config again, see the bug), then please include both:
# * the version of the config before the change, and
# * the version of the config after the change.

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

References

  • #0000
t0mk commented

@displague There is some code that guards the HTTP response codes when deleting metakk gateway:
https://github.com/equinix/terraform-provider-equinix/blob/main/equinix/resource_metal_gateway.go#L162

What's the scenario when the tf delete fails?