Documentation ¶
Overview ¶
proto enables building a shim.Provider around a tfprotov6.ProviderServer.
It is intended to help with schema generation, and should not be used for "runtime" resource operations like Provider.Apply, Provider.Diff, etc.
To view unsupported methods, see ./unsuported.go.
Index ¶
- func Empty() shim.Provider
- func New(ctx context.Context, server tfprotov6.ProviderServer) shim.Provider
- type Provider
- func (Provider) Apply(ctx context.Context, t string, s shim.InstanceState, d shim.InstanceDiff) (shim.InstanceState, error)
- func (p Provider) Config(context.Context) (tftypes.Object, error)
- func (Provider) Configure(ctx context.Context, c shim.ResourceConfig) error
- func (p Provider) DataSources(context.Context) (runtypes.DataSources, error)
- func (p Provider) DataSourcesMap() shim.ResourceMap
- func (Provider) Diff(ctx context.Context, t string, s shim.InstanceState, c shim.ResourceConfig, ...) (shim.InstanceDiff, error)
- func (Provider) InitLogging(ctx context.Context)
- func (Provider) InternalValidate() error
- func (Provider) IsSet(ctx context.Context, v interface{}) ([]interface{}, bool)
- func (Provider) Meta(ctx context.Context) interface{}
- func (Provider) NewDestroyDiff(ctx context.Context, t string, opts shim.TimeoutOptions) shim.InstanceDiff
- func (Provider) NewProviderConfig(ctx context.Context, object map[string]interface{}) shim.ResourceConfig
- func (Provider) NewResourceConfig(ctx context.Context, object map[string]interface{}) shim.ResourceConfig
- func (Provider) ReadDataApply(ctx context.Context, t string, d shim.InstanceDiff) (shim.InstanceState, error)
- func (Provider) ReadDataDiff(ctx context.Context, t string, c shim.ResourceConfig) (shim.InstanceDiff, error)
- func (Provider) Refresh(ctx context.Context, t string, s shim.InstanceState, c shim.ResourceConfig) (shim.InstanceState, error)
- func (p Provider) Resources(context.Context) (runtypes.Resources, error)
- func (p Provider) ResourcesMap() shim.ResourceMap
- func (p Provider) Schema() shim.SchemaMap
- func (p Provider) Server(context.Context) (tfprotov6.ProviderServer, error)
- func (Provider) Stop(ctx context.Context) error
- func (Provider) SupportsUnknownCollections() bool
- func (Provider) Validate(ctx context.Context, c shim.ResourceConfig) ([]string, []error)
- func (Provider) ValidateDataSource(ctx context.Context, t string, c shim.ResourceConfig) ([]string, []error)
- func (Provider) ValidateResource(ctx context.Context, t string, c shim.ResourceConfig) ([]string, []error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Empty ¶
Create a shim.Provider that wraps an empty tfprotov6.ProviderServer.
It is safe to use for schema operations (returning empty results). It has the same runtime restrictions as New.
func New ¶
New projects a new tfprotov6.ProviderServer into a schema only shim.Provider.
Non-schema runtime methods will panic.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides a shim from tfprotov6.ProviderServer to shim.Provider.
To create a Provider, use New. A zero value Provider will panic on most operations.
As much as possible, Provider is designed to be a wrapper type. It is cheap to create and use because it doesn't call any methods on the underlying server until it needs to.
Provider is part of an internal API and does not have any compatibility guarantees. It may be changed or removed in future updates.
func (Provider) Apply ¶
func (Provider) Apply( ctx context.Context, t string, s shim.InstanceState, d shim.InstanceDiff, ) (shim.InstanceState, error)
func (Provider) DataSources ¶
func (Provider) DataSourcesMap ¶
func (p Provider) DataSourcesMap() shim.ResourceMap
func (Provider) Diff ¶
func (Provider) Diff( ctx context.Context, t string, s shim.InstanceState, c shim.ResourceConfig, opts shim.DiffOptions, ) (shim.InstanceDiff, error)
func (Provider) InitLogging ¶
func (Provider) InternalValidate ¶
func (Provider) IsSet ¶
Checks if a value is representing a Set, and unpacks its elements on success.
func (Provider) NewDestroyDiff ¶
func (Provider) NewDestroyDiff(ctx context.Context, t string, opts shim.TimeoutOptions) shim.InstanceDiff
Create a Destroy diff for a resource identified by the TF token t.
func (Provider) NewProviderConfig ¶
func (Provider) NewResourceConfig ¶
func (Provider) ReadDataApply ¶
func (Provider) ReadDataApply(ctx context.Context, t string, d shim.InstanceDiff) (shim.InstanceState, error)
func (Provider) ReadDataDiff ¶
func (Provider) ReadDataDiff(ctx context.Context, t string, c shim.ResourceConfig) (shim.InstanceDiff, error)
func (Provider) Refresh ¶
func (Provider) Refresh( ctx context.Context, t string, s shim.InstanceState, c shim.ResourceConfig, ) (shim.InstanceState, error)
func (Provider) ResourcesMap ¶
func (p Provider) ResourcesMap() shim.ResourceMap