sdkv2

package
v3.92.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 34 Imported by: 261

Documentation

Index

Constants

View Source
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 NewProvider

func NewProvider(p *schema.Provider, opts ...providerOption) shim.Provider

func NewResource

func NewResource(r *schema.Resource) shim.Resource

func NewSchema

func NewSchema(s *schema.Schema) shim.Schema

func NewSchemaMap

func NewSchemaMap(m map[string]*schema.Schema) shim.SchemaMap

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

func WithPlanResourceChange(filter func(tfResourceType string) bool) providerOption

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

type PlanStateEditFunc = func(context.Context, PlanStateEditRequest) (cty.Value, error)

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.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL