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

Upgrade to Terraform Plugin SDK v2 #13

Open
holmesb opened this issue Feb 4, 2022 · 3 comments
Open

Upgrade to Terraform Plugin SDK v2 #13

holmesb opened this issue Feb 4, 2022 · 3 comments

Comments

@holmesb
Copy link
Contributor

holmesb commented Feb 4, 2022

https://www.terraform.io/plugin/sdkv2/guides/v2-upgrade-guide

@SchoolGuy
Copy link
Member

@hbokh Could you help out here maybe? I don't have the bandwith atm sadly.

@hbokh
Copy link
Contributor

hbokh commented Jun 2, 2022

I'm sorry but I am unable to handle this for various reasons.

  • at $COMPANY we are moving away from Cobbler and are still on v3.1.2. I am unable to test this (quickly) against the latest Cobbler version v3.3.2. Would need to setup a test env in my spare time.
  • I am not a (Go) developer. An experienced developer is definitely needed to solve this issue.
    Nevertheless I gave it a quick try / look anyway by scanning the Terraform Plugin SDK v2 Upgrade Guide.
    This is where I get stuck:
$GOPATH/bin/tf-sdk-migrator v2upgrade
Rewriting provider go.mod file...
Rewriting SDK package imports...
Running `go mod tidy`...
Error running go mod tidy: exit status 1
go: finding module for package github.com/hashicorp/terraform-plugin-sdk/v2/helper/hashcode
go: finding module for package github.com/hashicorp/terraform-plugin-sdk/v2/helper/pathorcontents
github.com/cobbler/terraform-provider-cobbler/cobbler imports
	github.com/hashicorp/terraform-plugin-sdk/v2/helper/hashcode: module github.com/hashicorp/terraform-plugin-sdk/v2@latest found (v2.17.0), but does not contain package github.com/hashicorp/terraform-plugin-sdk/v2/helper/hashcode
github.com/cobbler/terraform-provider-cobbler/cobbler imports
	github.com/hashicorp/terraform-plugin-sdk/v2/helper/pathorcontents: module github.com/hashicorp/terraform-plugin-sdk/v2@latest found (v2.17.0), but does not contain package github.com/hashicorp/terraform-plugin-sdk/v2/helper/pathorcontents

From the changelog:

BREAKING CHANGES

Removed the helper/mutexkv, helper/pathorcontents, httpclient, and helper/hashcode packages. These packages can be easily replicated in plugin code if necessary or the v1 versions can be used side-by-side (hashicorp/terraform-plugin-sdk#438)

As stated, I think someone with proper Golang knowledge can fix this easily, but sadly that won't be me...

@SchoolGuy
Copy link
Member

Okay thanks a lot for the quick look though! @hbokh

I guess then this will be added to the endless list of things I need to fix on the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants