Skip to content

Commit

Permalink
Fix ImportBasePath for dynamic bridged providers (#2705)
Browse files Browse the repository at this point in the history
The current code generates an import base path like
`github.com/pulumi/pulumi-terraform-provider/sdks/something/v3`. This is
a _module_ path (ends with a version number) not a package import path,
we always nest our packages one level below the module.

The correct import base path should be
`github.com/pulumi/pulumi-terraform-provider/sdks/something/v3/something`.
  • Loading branch information
Frassle authored Dec 10, 2024
1 parent b1f2d4f commit dc97546
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions dynamic/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func providerInfo(ctx context.Context, p run.Provider, value parameterize.Value)
"github.com/pulumi/pulumi-terraform-provider/sdks/go",
p.Name(),
tfbridge.GetModuleMajorVersion(p.Version()),
p.Name(),
),
RootPackageName: p.Name(),
LiftSingleValueMethodReturns: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"respectSchemaVersion": true
},
"go": {
"importBasePath": "github.com/pulumi/pulumi-terraform-provider/sdks/go/b2",
"importBasePath": "github.com/pulumi/pulumi-terraform-provider/sdks/go/b2/b2",
"rootPackageName": "b2",
"liftSingleValueMethodReturns": true,
"generateExtraInputTypes": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"respectSchemaVersion": true
},
"go": {
"importBasePath": "github.com/pulumi/pulumi-terraform-provider/sdks/go/databricks",
"importBasePath": "github.com/pulumi/pulumi-terraform-provider/sdks/go/databricks/databricks",
"rootPackageName": "databricks",
"liftSingleValueMethodReturns": true,
"generateExtraInputTypes": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"respectSchemaVersion": true
},
"go": {
"importBasePath": "github.com/pulumi/pulumi-terraform-provider/sdks/go/random/v3",
"importBasePath": "github.com/pulumi/pulumi-terraform-provider/sdks/go/random/v3/random",
"rootPackageName": "random",
"liftSingleValueMethodReturns": true,
"generateExtraInputTypes": true,
Expand Down

0 comments on commit dc97546

Please sign in to comment.