Error with Provider GRPCProviderServer

Hey everyone,

I updated the dependencies on a aws mediatailor custom provider and now I am getting the following error:

# github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema
../go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.27.0/helper/schema/provider.go:511:9: cannot use NewGRPCProviderServer(p) (value of type *GRPCProviderServer) as type tfprotov5.ProviderServer in return statement:
        *GRPCProviderServer does not implement tfprotov5.ProviderServer (missing GetMetadata method)

Does anyone know what it means and how to fix it? I shouldn’t even be calling on the github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema as far as I know, since I finished migrating to the new Terraform Provider Framework from the sdk v2.

Hi @isadoral :wave: Thank you for raising this topic and sorry you are running into trouble here. This is happening due to an awkward Go dependency situation that we would like to resolve soon. There’s a lengthy write up in this framework GitHub issue if you are more curious, but the quick answer is that you need to also upgrade your github.com/hashicorp/terraform-plugin-sdk/v2 dependency at the same time (e.g. go get github.com/hashicorp/terraform-plugin-sdk/v2@v2.30.0 as of this writing). The sdk/v2 dependency is still indirectly lingering in a lot of provider codebases due to terraform-plugin-testing. The next major version of terraform-plugin-testing will remove the sdk/v2 dependency.