Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Changing metro for equinix_metal_vrf should recreate resource #652

Closed
ctreatma opened this issue Apr 16, 2024 · 1 comment · Fixed by #790
Closed

[Bug]: Changing metro for equinix_metal_vrf should recreate resource #652

ctreatma opened this issue Apr 16, 2024 · 1 comment · Fixed by #790
Labels
bug Something isn't working

Comments

@ctreatma
Copy link
Contributor

Terraform Version

Terraform v1.5.7 on darwin_arm64

Equinix Provider Version

version = "1.34.1"

Effected Terraform Resources

equinix_metal_vrf

Terraform Config Files

No response

Debug Output

No response

Panic Output

No response

Expected Behavior

It is not possible to change the metro for an existing VRF in the Metal API: https://deploy.equinix.com/developers/api/metal#tag/VRFs/operation/updateVrf

When the metro attribute is changed for an existing VRF in terraform configuration, the provider should delete the existing VRF and create a new one in the specified metro.

Actual Behavior

When the metro attribute is changed for an existing VRF, the terraform provider throws an error after apply because the value in state does not match the value in config.

Steps to Reproduce

  1. Create a VRF with the equinix_metal_vrf resource
  2. Run terraform plan/apply
  3. Change the metro attribute of the resource
  4. Run terraform plan/apply
@ctreatma ctreatma added the bug Something isn't working label Apr 16, 2024
cprivitere added a commit that referenced this issue Oct 3, 2024
While testing a Terraform module that uses the VRF resource, I ran into
errors during terraform apply because I changed a metro or project ID
variable and Terraform attempted to use my existing VRF rather than
deleting it and recreating one in the correct metro or project.

This updates the `metal_vrf` resource schema so that Terraform will
delete and recreate a VRF if the metro or project ID changes, since
those values cannot be updated for a VRF.

Fixes #652
Copy link

This issue has been resolved in version 2.7.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant