Hello pulumi-gophers! Is there anyone among us ma...
# golang
n
Hello pulumi-gophers! Is there anyone among us maintaining "TF-bridged" providers ? We implemented few providers and while trying to upgrade the depencies, (i.e. the TF provider, the pulumi sdk, the pulumi terraform-plugin-sdk & the pulumi-terraform-bridge dependencies), we become unable to use the new version of our providers. To illustrate my issue, I created this dummy repo, which you just need to clone,
cd
into
scripts/
, and run
go build
. You should then get the following lines into your terminal:
Copy code
# <http://github.com/Eclion/pulumi-playground/dummy-sdk/go/dummy|github.com/Eclion/pulumi-playground/dummy-sdk/go/dummy>
../../../../go/pkg/mod/github.com/!eclion/pulumi-playground@v0.0.0-20230929090446-15f1174275f5/dummy-sdk/go/dummy/provider.go:69:64: type instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../../go/pkg/mod/github.com/!eclion/pulumi-playground@v0.0.0-20230929090446-15f1174275f5/dummy-sdk/go/dummy/provider.go:70:23: type instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../../go/pkg/mod/github.com/!eclion/pulumi-playground@v0.0.0-20230929090446-15f1174275f5/dummy-sdk/go/dummy/provider.go:89:69: type instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../../go/pkg/mod/github.com/!eclion/pulumi-playground@v0.0.0-20230929090446-15f1174275f5/dummy-sdk/go/dummy/provider.go:90:23: type instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
My understanding is that the upgrade of the Pulumi dependencies introduced the go generics which is why the
type instantiation
errors now appear. However, I couldn't find a way to fix the issue, appart using older pulumi dependencies, and running
go build
into the
dummy-provider
folder works without issues. Is there anyone who has an idea on how it is possible to fix this issue ?
a
You are missing a
go.mod
in your
dummy-sdk
folder.
See https://github.com/Eclion/pulumi-playground/pull/1 for details on how to resolve the problem.
n
Hi @ancient-policeman-24615! Awesome, it works as I wished. TIL at first I tried adding a go mod file a bit further in the folder but now I understand I just need to add it where at the same place I use in the go.mod where I import the package. Thanks a lot!!