-
Notifications
You must be signed in to change notification settings - Fork 47
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
[Feature]: Migrate resources to terraform plugin framework #612
Labels
enhancement
New feature or request
Comments
This was referenced Mar 5, 2024
|
This was referenced Mar 12, 2024
ctreatma
added a commit
that referenced
this issue
Mar 19, 2024
Part of #612 --------- Co-authored-by: codinja1188 <[email protected]> Co-authored-by: Charles Treatman <[email protected]>
ctreatma
added a commit
that referenced
this issue
Mar 19, 2024
Part of #612 --------- Signed-off-by: Ayush Rangwala <[email protected]> Signed-off-by: Charles Treatman <[email protected]> Co-authored-by: Charles Treatman <[email protected]>
ctreatma
added a commit
that referenced
this issue
Mar 20, 2024
…amework (#604) Part of #612 --------- Signed-off-by: ocobleseqx <[email protected]> Signed-off-by: Óscar Cobles <[email protected]> Co-authored-by: Charles Treatman <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are in the process of migrating all Terraform resources previously defined using the SDKv2 to the Terraform Framework. The utilization of the terraform-plugin-mux Go module has been successfully implemented to facilitate the gradual migration of resources. We have also adopted internal/ layout structure so the resources that are migrated to the framework must now be in their own compartment within internal/{services}/{resource}
Migrate to terraform plugin framework
adopt internal/ layout structure #106
Checklist for Unmigrated Resources
Fabric Resources
Metal Resources
WIP refactor: migrate resource metal_organization to framework #568
WIP refactor: migrate resource metal_organization_member to framework #588
WIP refactor: migrate resource and datasource equinix_metal_project to framework #604
Network Edge Resources
Checklist for Unmigrated Datasources
Fabric Datasources
Metal Datasources
WIP refactor: migrate resource metal_organization to framework #568
WIP refactor: migrate resource and datasource equinix_metal_project to framework #604
Network Edge Datasources
Migration Guide
Code in https://github.com/equinix/terraform-provider-equinix/blob/framework_migr_resources/internal/metal_organization/resource.go should be used as a base to migrate this resource.
Checkout the sdkv2 version https://github.com/equinix/terraform-provider-equinix/blob/main/equinix/resource_metal_organization.go
Checkout official documentation https://developer.hashicorp.com/terraform/plugin/framework/migrating/attributes-blocks/blocks for mapping between SDK Schema Fields and the Framewor. Here's also the link to recommended steps https://developer.hashicorp.com/terraform/plugin/framework/migrating#migration-steps
Code structure:
models.go
resource.go
resource_schema.go
resource_test.go
Schema Review:
Update Imports:
Rename Functions and Variables:
OrganizationResourceModel
toResourceModel
ororganizationResourceSchema
toresourceSchema
).Migrate End-to-End Tests (e2e):
ProtoV5ProviderFactories: acceptance.ProtoV5ProviderFactories
instead ofProviders: testAccProviders
.ssh_key
as a reference,TestAccMetalSSHKey_upgradeFromVersion
.Verification and Testing:
Migrate Equivalent Data Source (if applicable):
datasource.go
datasource_test.go
datasource_schema.go
The text was updated successfully, but these errors were encountered: