Open scraly opened 2 months ago
Even when I select a version of the provider, I don't have this information in the go.mod
file:
$ pulumi package add terraform-provider ovh/ovh 0.48.0
Successfully generated a Go SDK for the ovh package at /Users/avache/git/github.com/ovh/public-cloud-examples/containers-orchestration/managed-private-registry/create-registry-with-pulumi/ovhcloud-tf-registry-go/sdks/ovh
To use this SDK in your Go project, run the following command:
go mod edit -replace github.com/pulumi/pulumi-terraform-provider/sdks/go/ovh=./sdks/ovh
You can then use the SDK in your Go code with:
import "github.com/pulumi/pulumi-terraform-provider/sdks/go/ovh"
$ go mod edit -replace github.com/pulumi/pulumi-terraform-provider/sdks/go/ovh=./sdks/ovh
$ go mod tidy
go: found github.com/pulumi/pulumi-terraform-provider/sdks/go/ovh in github.com/pulumi/pulumi-terraform-provider/sdks/go/ovh v0.0.0-00010101000000-000000000000
So the user can't know what provider version he/she uses and if he/she needs to update the code to the latest version for example.
Hmmm... At some level this is intentional; the SDKs are local, and so we don't want to introduce confusion by implying that the code exists with that version at github.com/pulumi/pulumi-terraform-provider/sdks/go/ovh
However, I can see how a consumer of this SDK would like to be able to recover information about the version of the terraform provider it is pointing to. At the moment that information is embedded in the SDK, but a bit inaccessible:
rg -A3 '"ovh"' sdks/ovh/internal/pulumiUtilities.go
182: Name: "ovh",
183- Version: "0.48.0",
184- Value: parameter,
185- },
However, I imagine you may be looking at this from the perspective of a provider author and wanting a well defined versions of the SDK as well for the sake of triaging user issues as well? We have a bit of work to do there, but hoping to be able to follow up soon with an option for publishing versioned SDKs that leverage this generic bridged provider support.
What happened?
When using an existing Terraform provider (OVHcloud for example):
We don't know what is the version of the generated SDK:
That is a problem because an user can't know which version of the Terraform generated provider he/she uses.
Example
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).