https://pulumi.com logo
Title
c

clever-byte-21551

03/21/2021, 3:09 PM
I found a terraform provider that I want to use via pulumi https://github.com/fluxcd/terraform-provider-flux What’s the easiest way to do that? (I’m using golang)
w

white-balloon-205

03/21/2021, 11:34 PM
c

clever-byte-21551

03/22/2021, 7:16 AM
I followed the guide to the letter, but it doesn’t work out of the box. The TF plugin I’m using is built with terraform plugin sdk v2 I tried to tinker the resource.go to reflect that (using shimv2) but now I’m getting:
or visit <https://pulumi.com/docs/reference/install/> for manual instructions and release notes.
(cd provider && go build -a -o /Users/yarin/workspace/wiz-sec/pulumi-flux/bin/pulumi-tfgen-flux -ldflags "-X <http://github.com/pulumi/pulumi-flux/provider/pkg/version.Version=0.0.1-alpha.1614961308+939d3940.dirty|github.com/pulumi/pulumi-flux/provider/pkg/version.Version=0.0.1-alpha.1614961308+939d3940.dirty>" <http://github.com/pulumi/pulumi-flux/provider/cmd/pulumi-tfgen-flux)|github.com/pulumi/pulumi-flux/provider/cmd/pulumi-tfgen-flux)>
# <http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfshim/sdk-v2|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfshim/sdk-v2>
../../../../go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.18.1/pkg/tfshim/sdk-v2/upgrade_state.go:38:24: undefined: schema.UpgradeFlatmapState
../../../../go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.18.1/pkg/tfshim/sdk-v2/upgrade_state.go:44:14: undefined: schema.UpgradeJSONState
../../../../go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.18.1/pkg/tfshim/sdk-v2/upgrade_state.go:52:2: undefined: schema.RemoveAttributes
../../../../go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.18.1/pkg/tfshim/sdk-v2/upgrade_state.go:69:6: undefined: schema.NormalizeObjectFromLegacySDK
This probably due to pulumi-terraform-bridge using an old github.com/hashicorp/terraform-plugin-sdk/v2 version than the TF provider i’m trying to bridge
https://github.com/pulumi/pulumi-terraform-bridge/issues/333 - known issue with a workaround in the ticket
👍 1
b

broad-dog-22463

03/22/2021, 9:50 AM
Hey @clever-byte-21551 sorry about this :workaround: - so currently, there are 2 types of providers in the wild - TF plugin v1 and TF plugin v2 I am going to add something to the README aabout these and how to handle each of these types of providers
We need to be way better at giving people good documentation here