File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
pkg/pf/internal/providerbuilder Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ import (
2424 "github.com/hashicorp/terraform-plugin-framework/resource"
2525 "github.com/hashicorp/terraform-plugin-framework/tfsdk"
2626 "github.com/hashicorp/terraform-plugin-go/tfprotov6"
27+
28+ "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfbridge"
29+ tfbridge0 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
30+ "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens"
2731)
2832
2933// Provider is a test provider that can be used in tests.
@@ -81,6 +85,22 @@ func (impl *Provider) GRPCProvider() tfprotov6.ProviderServer {
8185 return providerserver .NewProtocol6 (impl )()
8286}
8387
88+ func (impl * Provider ) ToProviderInfo () tfbridge0.ProviderInfo {
89+ shimProvider := tfbridge .ShimProvider (impl )
90+
91+ provider := tfbridge0.ProviderInfo {
92+ P : shimProvider ,
93+ Name : impl .TypeName ,
94+ Version : "0.0.1" ,
95+ MetadataInfo : & tfbridge0.MetadataInfo {},
96+ EnableAccurateBridgePreview : true ,
97+ }
98+
99+ provider .MustComputeTokens (tokens .SingleModule (impl .TypeName , "index" , tokens .MakeStandard (impl .TypeName )))
100+
101+ return provider
102+ }
103+
84104type NewProviderArgs struct {
85105 TypeName string
86106 Version string
You can’t perform that action at this time.
0 commit comments