Documentation ¶
Overview ¶
Experimental extensions to the tfbridge module.
API exposed by this package is unstable and subject to change. As it stabilizes it will be moved to the parent package tfbridge.
Deprecated: This package has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge and github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens
Index ¶
- func AutoAliasing(providerInfo *b.ProviderInfo, artifact b.ProviderMetadata) errordeprecated
- func ComputeDefaults(info *b.ProviderInfo, opts DefaultStrategy) errordeprecated
- type DataSourceStrategydeprecated
- type DefaultStrategydeprecated
- func TokensInferredModules(info *b.ProviderInfo, finalize MakeToken, opts *InferredModulesOpts) (DefaultStrategy, error)deprecated
- func TokensKnownModules(tfPackagePrefix, defaultModule string, modules []string, finalize MakeToken) DefaultStrategydeprecated
- func TokensMappedModules(tfPackagePrefix, defaultModule string, modules map[string]string, ...) DefaultStrategydeprecated
- func TokensSingleModule(tfPackagePrefix, moduleName string, finalize MakeToken) DefaultStrategydeprecated
- type InferredModulesOptsdeprecated
- type MakeTokendeprecated
- type ResourceStrategydeprecated
- type Strategydeprecated
- type UnmappableErrordeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoAliasing
deprecated
added in
v3.43.0
func AutoAliasing(providerInfo *b.ProviderInfo, artifact b.ProviderMetadata) error
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.ProviderInfo.ApplyAutoAliases
func ComputeDefaults
deprecated
func ComputeDefaults(info *b.ProviderInfo, opts DefaultStrategy) error
Add mapped resources and datasources according to the given strategies.
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.ComputeTokens
Types ¶
type DataSourceStrategy
deprecated
type DataSourceStrategy = Strategy[tfbridge.DataSourceInfo]
A strategy for generating missing datasources.
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.DataSourceStrategy
type DefaultStrategy
deprecated
type DefaultStrategy struct { Resource ResourceStrategy DataSource DataSourceStrategy }
Describe the mapping from resource and datasource tokens to Pulumi resources and datasources.
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.Strategy
func TokensInferredModules
deprecated
added in
v3.42.0
func TokensInferredModules( info *b.ProviderInfo, finalize MakeToken, opts *InferredModulesOpts, ) (DefaultStrategy, error)
A strategy to infer module placement from global analysis of all items (Resources & DataSources).
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens.InferredModules
func TokensKnownModules
deprecated
func TokensKnownModules( tfPackagePrefix, defaultModule string, modules []string, finalize MakeToken, ) DefaultStrategy
A strategy for assigning tokens to a hand generated set of modules.
If defaultModule is "", then the returned strategies will error on not encountering a matching module.
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens.KnownModules
func TokensMappedModules
deprecated
added in
v3.45.0
func TokensMappedModules( tfPackagePrefix, defaultModule string, modules map[string]string, finalize MakeToken, ) DefaultStrategy
A strategy for assigning tokens to a hand generated set of modules with an arbitrary mapping from TF modules to Pulumi modules.
If defaultModule is "", then the returned strategies will error on not encountering a matching module.
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens.MappedModules
func TokensSingleModule
deprecated
func TokensSingleModule( tfPackagePrefix, moduleName string, finalize MakeToken, ) DefaultStrategy
A strategy that assigns all tokens to the same module.
For example:
rStrat, dStrat := TokensSingleModule("pkgName_", "index", finalize)
The above example would transform "pkgName_foo" into "pkgName:index:Foo".
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens.SingleModule
func (DefaultStrategy) Unmappable ¶
func (ts DefaultStrategy) Unmappable(substring, reason string) DefaultStrategy
type InferredModulesOpts
deprecated
added in
v3.42.0
type InferredModulesOpts struct { // The TF prefix of the package. TfPkgPrefix string // The name of the main module. Defaults to "index". MainModule string // The minimum number of shared items for a prefix before it becomes a module. // // < 0 -> don't bin into modules. // = 0 -> apply the default value. // > 0 -> set the value. MinimumModuleSize int // The number of items in a longer prefix needed to break out into it's own prefix. // // For example, with the tokens `pkg_mod_sub1_a`, `pkg_mod_sub2_b`, `pkg_mod_sub2_c`, // `pkg_mod_sub3_d`: // // MinimumSubmoduleSize = 3 will result in: // // pkg:mod:Sub1A, pkg:mod:Sub2B, pkg:mod:Sub2C, pkg:mod:Sub3D // // MinimumSubmoduleSize = 2 will result in: // // pkg:mod:Sub1A, pkg:modSub2:B, pkg:modSub2C, pkg:mod:Sub3D // // < 0 -> don't bin into submodules. Only the most common prefix will be used. // = 0 -> apply the default value. // > 0 -> set the value. MimimumSubmoduleSize int }
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens.InferredModulesOpts
type MakeToken
deprecated
A function that joins a module and name into a pulumi type token.
For example:
func(module, name string) (string, error) { return fmt.Sprintf("pkgName:%s:%s", module, name), nil }
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens.Make
func MakeStandardToken
deprecated
Convert a Terraform token to a Pulumi token with the standard mapping.
The mapping is
(pkg, module, name) => pkg:module/lowerFirst(name):name
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens.MakeStandard
type ResourceStrategy
deprecated
type ResourceStrategy = Strategy[tfbridge.ResourceInfo]
A strategy for generating missing resources.
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.ResourceStrategy
type Strategy
deprecated
type Strategy[T tfbridge.ResourceInfo | tfbridge.DataSourceInfo] func(tfToken string) (*T, error)
A generic remapping strategy.
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.ElementStrategy
func (Strategy[T]) Unmappable ¶
Mark that a strategy cannot handle a sub-string.
type UnmappableError
deprecated
Indicate that a token cannot be mapped.
Deprecated: This item has been moved to github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/UnmappableError
func (UnmappableError) Error ¶
func (err UnmappableError) Error() string
func (UnmappableError) Unwrap ¶
func (err UnmappableError) Unwrap() error