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

Facilities can be specified by ID, but then resources are destroyed and recreated after the provider normalizes to names #202

Closed
grahamc opened this issue Dec 14, 2020 · 2 comments
Labels
bug Something isn't working source/terraform-provider-metal This issue/pr was originally created in deprecated terraform-provider-metal repository

Comments

@grahamc
Copy link

grahamc commented Dec 14, 2020

I wish I had a good log of this happening, but I created a spot market request in the facility c9dcbd06-6797-4096-b648-1be16dd5d833 (dfw2) and it worked correctly. I then applied again, and the plan included destroying all my spot market requests, and recreating them, because the provider recorded the actual facility as dfw2. Maybe a reasonable option here is rejecting UUID-based facilities?

@displague
Copy link
Member

I'm sorry to hear that, @grahamc.

I don't know if it is possible to use the client to look up the facility UUID during theDiffSuppressFunc for facility, but that could be one approach.

https://registry.terraform.io/providers/equinix/metal/latest/docs/resources/device#facilities
The documentation for this field says that "facility codes" should be used, it would seem to fair to block UUIDs. Since any user that was using UUIDs would shared your experience, we shouldn't worry about backwards-compatibility in a solution for this, since facilities = [UUID] was never a working approach (beyond the initial provision).

@displague displague added the bug Something isn't working label Dec 15, 2020
@grahamc grahamc changed the title Facilities can bes pecified by ID, but then resources are destroyed and recreated after the provider normalizes to names Facilities can be specified by ID, but then resources are destroyed and recreated after the provider normalizes to names Dec 19, 2020
@ocobles ocobles transferred this issue from equinix/terraform-provider-metal Jun 20, 2022
@ocobles ocobles added the source/terraform-provider-metal This issue/pr was originally created in deprecated terraform-provider-metal repository label Jun 20, 2022
@displague
Copy link
Member

Closing this since it relates to a deprecated feature #312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working source/terraform-provider-metal This issue/pr was originally created in deprecated terraform-provider-metal repository
Projects
None yet
Development

No branches or pull requests

3 participants