-
Notifications
You must be signed in to change notification settings - Fork 11
Migrating from the Packet Provider #1
Comments
hmm, it will be demanding to write a proper guide to migrate from packet to metal, even though it's just a name change. I wonder if it has been done before with some other provider, and I saw that you asked in Hashcorp Slack. The steps that you've listed seem reasonable, but there's a lot of them. Maybe it would be worth to create a golang migrator tool, like https://github.com/hashicorp/tf-sdk-migrator |
I came across this the other day, I don't know how relevant it is to our needs since the resource names are also being renamed. https://www.terraform.io/docs/commands/state/replace-provider.html. |
We will also need to address how best to migrate |
https://www.terraform.io/docs/configuration/provider-requirements.html#requiring-providers
2020-12-16 update: This wouldn't work. The provider alias syntax does not allow the resource name to use the alias name. You can not alias equinix/metal as |
Does |
https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/version_3_upgrade is a nice example of how we can close this issue. Once we have created a guide in the docs, on how to migrate between the two providers, we can close this issue and address new concerns as they come in. |
FYI. I took the following approach to migrate our to the new Equinix Provider
|
Continued from packethost/terraform-provider-packet#288
Users coming from the Packet provider can convert their existing configurations to work with this provider.
This Equinix Metal provider is derived from v3.2.0 of the Packet provider.
The
packet_
resources have all been renamed tometal_
. Instructions to adapt existing projects to this provider should be included in the README.md.Here are some initial thoughts on what this content should include.
When converting a project from Packet to Equinix Metal:
hardware_reservation_id
problem)terraform plan
, resolve any diffs before proceedingpacket_
references in the config and modules tometal_
packethost/packet
references in the module toequinix/equinix-metal
packethost
references in the module toequinix
terraform init --upgrade
to fetch theequinix-metal
providerterraform plan
and look for no changes, if the plan is clean it should be safe to applyIt may also be advisable to update to the latest version of Terraform before making any of these changes. A proper
versions.tf
(the contents of that file, fromterraform 0.12-upgrade
, required in TF 0.13) and.terraform.lock.hcl
file is needed in TF 0.12+ and TF 0.14+ respectively.The text was updated successfully, but these errors were encountered: