shihanng / terraform-provider-installer

A Terraform provider to setup development environment machine.
https://registry.terraform.io/providers/shihanng/installer/latest/docs
MIT License
11 stars 3 forks source link

Migrate from SDK V2 to terraform-plugin-framework. #93

Open ScionOfDesign opened 1 year ago

ScionOfDesign commented 1 year ago

Currently, the terraform-plugin-sdk/v2 go package is used for this provider.

However, Hashicorp recommends using the new framework as feature development has stopped on the old SDK: https://developer.hashicorp.com/terraform/plugin/framework-benefits

ScionOfDesign commented 1 year ago

I have been working on this issue here: https://github.com/shihanng/terraform-provider-installer/compare/trunk...StudioWhyNot:terraform-provider-installer:feature/upgrade-to-scaffolding

I have been focusing on apt at the moment, but plan on adding the other providers as well. It also comes with a few refactors to reduce some code duplication.

shihanng commented 1 year ago

A couple of things to keep in mind:

  1. I want to avoid breaking changes from the user's point of view. The existing Terraform configuration should work as is.
  2. I can see that the PR for this issue will be huge. It will take multiple back-and-forth comments, questions, and changes. Mainly to make sure that the change is the least disruptive as possible. 🙏
ScionOfDesign commented 1 year ago

Got it! I will keep both of those in mind! And yes, my goal is for it to be as least-disruptive as possible to the end user.