Documentation ¶
Overview ¶
Package tfbridge implements adapters for constructing Pulumi Resource Providers from Terraform providers built with the Terraform Plugin Framework.
Index ¶
- func Main(ctx context.Context, pkg string, prov tfbridge.ProviderInfo, ...)
- func MainWithMuxer(ctx context.Context, pkg string, info tfbridge.ProviderInfo, schema []byte)
- func MakeMuxedServer(ctx context.Context, pkg string, info tfbridge.ProviderInfo, schema []byte) func(host *rprovider.HostClient) (pulumirpc.ResourceProviderServer, error)
- func MuxShimWithDisjointgPF(ctx context.Context, shim shim.Provider, p pfprovider.Provider) shim.Provider
- func MuxShimWithPF(ctx context.Context, shim shim.Provider, p pfprovider.Provider) shim.Provider
- func NewProvider(ctx context.Context, info tfbridge.ProviderInfo, meta ProviderMetadata) (plugin.Provider, error)
- func NewProviderServer(ctx context.Context, logSink logging.Sink, info tfbridge.ProviderInfo, ...) (pulumirpc.ResourceProviderServer, error)
- func SchemaOnlyPluginFrameworkProvider(ctx context.Context, p pfprovider.Provider) shim.Providerdeprecated
- func ShimProvider(p pfprovider.Provider) shim.Provider
- func ShimProviderWithContext(ctx context.Context, p pfprovider.Provider) shim.Provider
- type ProviderMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Main ¶
func Main(ctx context.Context, pkg string, prov tfbridge.ProviderInfo, meta ProviderMetadata)
Implements main() or a bridged Pulumi plugin, complete with argument parsing.
info.P must be constructed with ShimProvider or ShimProviderWithContext.
func MainWithMuxer ¶ added in v0.7.1
Implements main() or a bridged Pulumi plugin, complete with argument parsing.
This is an experimental API.
func MakeMuxedServer ¶ added in v0.7.1
func MakeMuxedServer( ctx context.Context, pkg string, info tfbridge.ProviderInfo, schema []byte, ) func(host *rprovider.HostClient) (pulumirpc.ResourceProviderServer, error)
Create a function to produce a Muxed provider.
This function exposes implementation details for testing. It should not be used outside of pulumi-terraform-bridge. This is an experimental API.
func MuxShimWithDisjointgPF ¶ added in v0.9.0
func MuxShimWithDisjointgPF(ctx context.Context, shim shim.Provider, p pfprovider.Provider) shim.Provider
MuxShimWithDisjointgPF initializes a shim.Provider that will server resources from both shim and p.
This function will panic if shim and p both define the same token.
To create a muxed provider, ProviderInfo.P must be the result of this function.
func MuxShimWithPF ¶ added in v0.7.1
MuxShimWithPF initializes a shim.Provider that will server resources from both shim and p.
If shim and p both define the same token, then the value from shim will be used.
To create a muxed provider, ProviderInfo.P must be the result of this function.
func NewProvider ¶
func NewProvider(ctx context.Context, info tfbridge.ProviderInfo, meta ProviderMetadata) (plugin.Provider, error)
Adapts a provider to Pulumi. Most users do not need to call this directly but instead use Main to build a fully functional binary.
info.P must be constructed with ShimProvider or ShimProviderWithContext.
func NewProviderServer ¶ added in v0.9.0
func NewProviderServer( ctx context.Context, logSink logging.Sink, info tfbridge.ProviderInfo, meta ProviderMetadata, ) (pulumirpc.ResourceProviderServer, error)
Internal. The signature of this function can change between major releases. Exposed to facilitate testing.
func SchemaOnlyPluginFrameworkProvider
deprecated
added in
v0.7.1
func ShimProvider ¶ added in v0.9.3
func ShimProvider(p pfprovider.Provider) shim.Provider
Wrap a PF Provider in a shim.Provider.
func ShimProviderWithContext ¶ added in v0.9.3
Wrap a PF Provider in a shim.Provider with the given context.Context.
Types ¶
type ProviderMetadata ¶
type ProviderMetadata struct { // JSON-serialzed Pulumi Package Schema. PackageSchema []byte // Deprecated. This field is no longer in use and will be removed in future versions. BridgeMetadata []byte }
Defines bridged provider metadata that is pre-computed at build time with tfgen (tfgen ("github.com/pulumi/pulumi-terraform-bridge/pf/tfgen") and typically made available to the provider binary at runtime with embed.
Source Files ¶
- detect_check_failures.go
- dynamic_value.go
- extend.go
- ids.go
- logging.go
- main.go
- metadata.go
- naming.go
- package.go
- provider.go
- provider_attach.go
- provider_check.go
- provider_checkconfig.go
- provider_configure.go
- provider_create.go
- provider_datasources.go
- provider_delete.go
- provider_diagnostics.go
- provider_diff.go
- provider_diffconfig.go
- provider_get_mapping.go
- provider_invoke.go
- provider_plan.go
- provider_read.go
- provider_resources.go
- provider_streaminvoke.go
- provider_update.go
- provider_upgrade_resource_state.go
- resource_state.go
- serve.go