Twingate / pulumi-twingate

Apache License 2.0
4 stars 1 forks source link

Issues when trying to use the provider in golang #90

Closed victorlcm closed 2 months ago

victorlcm commented 3 months ago

Hi,

I'm getting the error go: module github.com/Twingate/pulumi-twingate@upgrade found (v3.0.4+incompatible), but does not contain package github.com/Twingate/pulumi-twingate/sdk/go/twingate when trying to install the provider in my Pulumi project using the golang sdk. Can someone help with this?

Thanks!

twingate-blee commented 3 months ago

I was not able to reproduce the issue. Does the example at https://github.com/Twingate/pulumi-twingate/tree/main/examples/go work for you?

knmsk commented 2 months ago

I have the same error here, I've tried to get the package using go get github.com/Twingate/pulumi-twingate/sdk/v3 but the output is module github.com/Twingate/pulumi-twingate@upgrade found (v3.0.6+incompatible), but does not contain package github.com/Twingate/pulumi-twingate/sdk.

The steps to reproduce the error in my case:

  1. Clone https://github.com/pulumi/pulumi-component-provider-go-boilerplate (component builder for golang)
  2. Update the go.mod file with Golang version 1.22 or others manually editing the file or running go mod edit -go=1.22
  3. Run go mod tidy
  4. Run go get github.com/Twingate/pulumi-twingate/sdk/v3

I was not able to reproduce the issue. Does the example at https://github.com/Twingate/pulumi-twingate/tree/main/examples/go work for you?

Maybe this line replace github.com/Twingate/pulumi-twingate/sdk/v3 v3.0.4 => ../../sdk inside go.mod file would replace the package "fetch" and use it as the module?

twingate-blee commented 2 months ago

I was able to reproduce the issue when I ran the example outside of the repo. Here is a PR with the updated example https://github.com/Twingate/pulumi-twingate/pull/109