Documentation ¶
Index ¶
- Constants
- func IsInstanceState(s shim.InstanceState) (*terraform.InstanceState, bool)
- func NewInstanceState(s *terraform.InstanceState) shim.InstanceState
- func NewInstanceStateForResource(s *terraform.InstanceState, resource *schema.Resource) shim.InstanceState
- func NewProvider(p *schema.Provider, opts ...providerOption) shim.Provider
- func NewResource(r *schema.Resource) shim.Resource
- func NewSchema(s *schema.Schema) shim.Schema
- func NewSchemaMap(m map[string]*schema.Schema) shim.SchemaMap
- func WithDiffStrategy(s DiffStrategy) providerOption
- func WithPlanResourceChange(filter func(tfResourceType string) bool) providerOption
- func WithPlanStateEdit(f PlanStateEditFunc) providerOption
- type DiffStrategy
- type PlanStateEditFunc
- type PlanStateEditRequest
Constants ¶
const UnknownVariableValue = "74D93920-ED26-11E3-AC10-0800200C9A66"
UnknownVariableValue is the sentinal defined in github.com/hashicorp/terraform/configs/hcl2shim, representing a variable whose value is not known at some particular time. The value is duplicated here in order to prevent an additional dependency - it is unlikely to ever change upstream since that would break rather a lot of things.
Variables ¶
This section is empty.
Functions ¶
func IsInstanceState ¶
func IsInstanceState(s shim.InstanceState) (*terraform.InstanceState, bool)
func NewInstanceState ¶
func NewInstanceState(s *terraform.InstanceState) shim.InstanceState
func NewInstanceStateForResource ¶ added in v3.51.1
func NewInstanceStateForResource(s *terraform.InstanceState, resource *schema.Resource) shim.InstanceState
func WithDiffStrategy ¶ added in v3.42.0
func WithDiffStrategy(s DiffStrategy) providerOption
Deprecated. TODO[pulumi/pulumi-terraform-bridge#2062] clean up deprecation.
func WithPlanResourceChange ¶ added in v3.73.0
Selectively opt-in resources that pass the filter to using PlanResourceChange. Resources are identified by their TF type name such as aws_ssm_document.
func WithPlanStateEdit ¶ added in v3.91.0
func WithPlanStateEdit(f PlanStateEditFunc) providerOption
WithPlanStateEdit adds the PlanStateEditFunc hook to be called on the planned state after each resource is updated.
WithPlanStateEdit only applies to resources where Plan Resource Change[^1] is enabled.
WithPlanStateEdit is experimental. The API may be removed or experience backwards incompatible changes at any time.
[^1]: See WithPlanResourceChange for more details.
Types ¶
type DiffStrategy ¶ added in v3.42.0
type DiffStrategy int
Configures how the provider performs Diff. Since this is a sensitive method that can result in unexpected breaking changes, using a configurable DiffStrategy as a feature flag assists gradual rollout.
Deprecated.
TODO[pulumi/pulumi-terraform-bridge#2062] clean up deprecation.
const ( // Uses the strategy from pulumi-terraform-bridge v3.41.0 and before. ClassicDiff DiffStrategy = 0 // An experimental strategy that mimics the behavior of Terraform CLI to compute PlannedState as part of the // diff, and performs better than ClassicDiff in complicated cases of set-nested blocks. PlanState DiffStrategy = 1 // This strategy would run both PlanState and ClassicDiff strategies and compare their result, generating a // warning if they mismatch. It always behaves as ClassicDiff execept for the warnings. TryPlanState DiffStrategy = 2 )
func ParseDiffStrategy ¶ added in v3.42.0
func ParseDiffStrategy(text string) (DiffStrategy, error)
Deprecated.
TODO[pulumi/pulumi-terraform-bridge#2062] clean up deprecation.
func ParseDiffStrategyFromEnv ¶ added in v3.42.0
func ParseDiffStrategyFromEnv() (DiffStrategy, bool, error)
Deprecated.
TODO[pulumi/pulumi-terraform-bridge#2062] clean up deprecation.
func (DiffStrategy) String ¶ added in v3.42.0
func (s DiffStrategy) String() string
type PlanStateEditFunc ¶ added in v3.91.0
PlanStateEditFunc describes a user supplied function to edit TF's plan state.
For use, see WithPlanStateEdit.
type PlanStateEditRequest ¶ added in v3.91.0
type PlanStateEditRequest struct { TfToken string // The TF token PlanState cty.Value // The plan state calculated by TF. NewInputs resource.PropertyMap // The post-check inputs given by Pulumi. ProviderConfig resource.PropertyMap // The config of the provider }
PlanStateEditRequest
For use, see WithPlanStateEdit.