util

package
v3.82.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastToTypeObject added in v3.70.0

func CastToTypeObject(tfs shim.Schema) (shim.SchemaMap, bool)

CastToTypeObject performs a checked cast from shim.Schema to a TF object (a collection of fields).

See [shim.Schema.Elem()] comment for all the details of the encoding.

func IsOfTypeMap added in v3.68.0

func IsOfTypeMap(tfs shim.Schema) bool

IsOfTypeMap detects schemas indicating a map[string,X] type. Due to a quirky encoding of single-nested Terraform blocks, it is insufficient to just check for tfs.Type() == shim.TypeMap. See [shim.Schema.Elem()] comment for all the details of the encoding.

Types

type FilteringProvider added in v3.39.1

type FilteringProvider struct {
	Provider         shim.Provider
	ResourceFilter   func(token string) bool
	DataSourceFilter func(token string) bool
}

func (*FilteringProvider) Apply added in v3.39.1

func (*FilteringProvider) Configure added in v3.39.1

func (*FilteringProvider) DataSourcesMap added in v3.39.1

func (p *FilteringProvider) DataSourcesMap() shim.ResourceMap

func (*FilteringProvider) Diff added in v3.39.1

func (*FilteringProvider) InitLogging added in v3.39.1

func (p *FilteringProvider) InitLogging(ctx context.Context)

func (*FilteringProvider) InternalValidate added in v3.81.0

func (p *FilteringProvider) InternalValidate() error

func (*FilteringProvider) IsSet added in v3.39.1

func (p *FilteringProvider) IsSet(ctx context.Context, v interface{}) ([]interface{}, bool)

func (*FilteringProvider) Meta added in v3.39.1

func (p *FilteringProvider) Meta(ctx context.Context) interface{}

func (*FilteringProvider) NewDestroyDiff added in v3.39.1

func (p *FilteringProvider) NewDestroyDiff(
	ctx context.Context, t string, opts shim.TimeoutOptions,
) shim.InstanceDiff

func (*FilteringProvider) NewResourceConfig added in v3.39.1

func (p *FilteringProvider) NewResourceConfig(
	ctx context.Context, object map[string]interface{},
) shim.ResourceConfig

func (*FilteringProvider) ReadDataApply added in v3.39.1

func (p *FilteringProvider) ReadDataApply(
	ctx context.Context, t string, d shim.InstanceDiff,
) (shim.InstanceState, error)

func (*FilteringProvider) ReadDataDiff added in v3.39.1

func (*FilteringProvider) Refresh added in v3.39.1

func (*FilteringProvider) ResourcesMap added in v3.39.1

func (p *FilteringProvider) ResourcesMap() shim.ResourceMap

func (*FilteringProvider) Schema added in v3.39.1

func (p *FilteringProvider) Schema() shim.SchemaMap

func (*FilteringProvider) Stop added in v3.39.1

func (p *FilteringProvider) Stop(ctx context.Context) error

func (*FilteringProvider) Validate added in v3.39.1

func (p *FilteringProvider) Validate(ctx context.Context, c shim.ResourceConfig) ([]string, []error)

func (*FilteringProvider) ValidateDataSource added in v3.39.1

func (p *FilteringProvider) ValidateDataSource(
	ctx context.Context, t string, c shim.ResourceConfig,
) ([]string, []error)

func (*FilteringProvider) ValidateResource added in v3.39.1

func (p *FilteringProvider) ValidateResource(
	ctx context.Context, t string, c shim.ResourceConfig,
) ([]string, []error)

type UnimplementedProvider

type UnimplementedProvider struct{}

An embed-able unimplemented Provider for use in testing.

func (UnimplementedProvider) Apply

func (UnimplementedProvider) Configure

func (UnimplementedProvider) DataSourcesMap

func (UnimplementedProvider) DataSourcesMap() shim.ResourceMap

func (UnimplementedProvider) Diff

func (UnimplementedProvider) InitLogging

func (UnimplementedProvider) InitLogging(ctx context.Context)

func (UnimplementedProvider) InternalValidate added in v3.81.0

func (UnimplementedProvider) InternalValidate() error

func (UnimplementedProvider) IsSet

func (UnimplementedProvider) IsSet(ctx context.Context, v interface{}) ([]interface{}, bool)

func (UnimplementedProvider) Meta

func (UnimplementedProvider) Meta(ctx context.Context) interface{}

func (UnimplementedProvider) NewDestroyDiff

func (UnimplementedProvider) NewResourceConfig

func (UnimplementedProvider) NewResourceConfig(
	ctx context.Context, object map[string]interface{},
) shim.ResourceConfig

func (UnimplementedProvider) ReadDataApply

func (UnimplementedProvider) ReadDataDiff

func (UnimplementedProvider) Refresh

func (UnimplementedProvider) ResourcesMap

func (UnimplementedProvider) ResourcesMap() shim.ResourceMap

func (UnimplementedProvider) Schema

func (UnimplementedProvider) Stop

func (UnimplementedProvider) Validate

func (UnimplementedProvider) ValidateDataSource

func (UnimplementedProvider) ValidateDataSource(
	ctx context.Context, t string, c shim.ResourceConfig,
) ([]string, []error)

func (UnimplementedProvider) ValidateResource

func (UnimplementedProvider) ValidateResource(
	ctx context.Context, t string, c shim.ResourceConfig,
) ([]string, []error)

Jump to

Keyboard shortcuts

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