-
Notifications
You must be signed in to change notification settings - Fork 381
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
Migrate to terraform-plugin-sdk #346
Conversation
@stack72 hey, could you please rebase? I'm ok with migrating to the SDK, but can't merge this because of conflicts. Thanks! |
d158e6b
to
d1e7b7c
Compare
Hi @bkabrda PR updated and rebased - this would make me very happy if this got merged and released :) Paul |
Thanks for the quick response! I'm now testing all the changes locally to make sure this doesn't break anything. If tests pass, I'm going to merge (because I like making people happy ;)) |
Awesome! Let me know if you need any changes :) I'm sure we can also ask the nice people of Terraform to kick off a set of acceptance tests! |
Yeah, I'm trying to run acceptance tests locally, so that will speed things up. Right now, it seems I can't even execute the tests because I'm getting this error:
Have you seen that already? |
What command are you running for this? The code is compiling here:
|
I'm running
|
``` ▶ GO111MODULE=on tf-sdk-migrator check Checking Go runtime version ... Go version 1.12.10: OK. Checking whether provider uses Go modules... Go modules in use: OK. Checking version of github.com/hashicorp/terraform-plugin-sdk to determine if provider was already migrated... Checking version of github.com/hashicorp/terraform used in provider... Terraform version 0.12.7: OK. Checking whether provider uses deprecated SDK packages or identifiers... No imports of deprecated SDK packages or identifiers: OK. All constraints satisfied. Provider can be migrated to the new SDK. ``` ``` ▶ GO111MODULE=on tf-sdk-migrator migrate Checking Go runtime version ... Go version 1.12.10: OK. Checking whether provider uses Go modules... Go modules in use: OK. Checking version of github.com/hashicorp/terraform-plugin-sdk to determine if provider was already migrated... Checking version of github.com/hashicorp/terraform used in provider... Terraform version 0.12.7: OK. Checking whether provider uses deprecated SDK packages or identifiers... No imports of deprecated SDK packages or identifiers: OK. All constraints satisfied. Provider can be migrated to the new SDK. Rewriting provider go.mod file... Rewriting SDK package imports... Running `go mod tidy`... Success! Provider is migrated to github.com/hashicorp/terraform-plugin-sdk v1.1.0. It looks like this provider vendors dependencies. Don't forget to run `go mod vendor`. Make sure to review all changes and run all tests. ```
d1e7b7c
to
e3ee0d8
Compare
@bkabrda looks like this is a way older version of the SDK since I opened it a long time ago - I just upgraded the SDK version - wanna try the updated PR now? |
Yup, the tests are running now. Thanks. Running all the integration tests takes a while, I'll let you know how it goes. |
Great news :) Thanks!! |
🎉 all tests are passing. The PR LGTM, so no further objections from my side. Merging. Thanks for the contribution! |
You rock! thanks for this - looking forward to the next release :) |
Step 1: Upgrade to hashicorp/terraform v0.12.7 to prepare for plugin-sdk migration
this is required to meet the check for tf-migrator constraints
Step 2: Perform the migration