https://pulumi.com logo
b

brave-afternoon-91593

09/03/2021, 8:29 PM
👋 I’m trying to use the tf-provider-boilerplate to implement a Pulumi TF Package. My TF Provider uses the terraform-sdk v2, whereas the boilerplate uses v1. Is there a way to bridge a Terraform SDK v2 provider?
b

billowy-army-68599

09/03/2021, 8:32 PM
yes this is possible, which provider are you trying to bridge?
It’s unconventionally named, but I think I got all the imports and references sorted.
Copy code
./resources.go:93:43: cannot use "<http://github.com/gravitational/teleport-plugins/terraform/provider|github.com/gravitational/teleport-plugins/terraform/provider>".Provider() (type *"<http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema>".Provider) as type *"<http://github.com/hashicorp/terraform-plugin-sdk/helper/schema|github.com/hashicorp/terraform-plugin-sdk/helper/schema>".Provider in argument to sdkv1.NewProvider
b

billowy-army-68599

09/03/2021, 8:34 PM
Hmm I wonder if @broad-dog-22463 has any ideas, been a while since I did this
b

brave-afternoon-91593

09/03/2021, 8:35 PM
Unrelated, this one doesn’t use the Terraform SDK, so it won’t translate as magically, right?
b

billowy-army-68599

09/03/2021, 8:43 PM
That’s right, only terraform sdk providers are supported
1
b

brave-afternoon-91593

09/03/2021, 8:54 PM
I think I got it building with shim/sdk-v2.
go get
works at least.