cobbler / terraform-provider-cobbler

https://registry.terraform.io/providers/cobbler/cobbler/latest
Mozilla Public License 2.0
10 stars 9 forks source link

Upgrade to Terraform Plugin SDK v2 #13

Closed holmesb closed 1 month ago

holmesb commented 2 years ago

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

SchoolGuy commented 2 years ago

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

hbokh commented 2 years ago

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

$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 (https://github.com/hashicorp/terraform-plugin-sdk/issues/438)

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

SchoolGuy commented 2 years ago

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.