Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bridging instructions after we moved /pf to /v3/pkg/pf #171

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions provider/resources.go
Original file line number Diff line number Diff line change
@@ -73,29 +73,29 @@ func Provider() tfbridge.ProviderInfo {
//
// - Remove the `shimv2` import and add:
//
// pfbridge "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge"
// pfbridge "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfbridge"
//
// - Replace `shimv2.NewProvider` with `pfbridge.ShimProvider`.
//
// - In provider/cmd/pulumi-tfgen-xyz/main.go, replace the
// "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen" import with
// "github.com/pulumi/pulumi-terraform-bridge/pf/tfgen". Remove the `version.Version`
// "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfgen". Remove the `version.Version`
// argument to `tfgen.Main`.
//
// - In provider/cmd/pulumi-resource-xyz/main.go, replace the
// "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge" import with
// "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge". Replace the arguments to the
// "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfbridge". Replace the arguments to the
// `tfbridge.Main` so it looks like this:
//
// tfbridge.Main(context.Background(), "xyz", xyz.Provider(),
// tfbridge.ProviderMetadata{PulumiSchema: pulumiSchema})
//
// Detailed instructions can be found at
// https://github.com/pulumi/pulumi-terraform-bridge/blob/master/pf/README.md#how-to-upgrade-a-bridged-provider-to-plugin-framework.
// https://pulumi-developer-docs.readthedocs.io/projects/pulumi-terraform-bridge/en/latest/docs/guides/new-pf-provider.html
// After that, you can proceed as normal.
//
// This is where you give the bridge a handle to the upstream terraform provider. SDKv2
// convention is to have a function at "github.com/iwahbe/terraform-provider-xyz/provider".New
// convention is to have a function at "github.com/pulumi/terraform-provider-xyz/provider".New
// which takes a version and produces a factory function. The provider you are bridging may
// not do that. You will need to find the function (generally called in upstream's main.go)
// that produces a: