Documentation
¶
Index ¶
- func RegisterDataRouter(router datarouter.Router) func(Server) Server
- func RegisterProvider(provider Provider) func(Server) Server
- func RegisterResourceRouter(router resourcerouter.Router) func(Server) Server
- type Opt
- type Provider
- type Server
- func (s Server) ApplyResourceChange(ctx context.Context, req *tfprotov6.ApplyResourceChangeRequest) (*tfprotov6.ApplyResourceChangeResponse, error)
- func (s Server) CallFunction(ctx context.Context, req *tfprotov6.CallFunctionRequest) (*tfprotov6.CallFunctionResponse, error)
- func (s Server) CloseEphemeralResource(ctx context.Context, req *tfprotov6.CloseEphemeralResourceRequest) (*tfprotov6.CloseEphemeralResourceResponse, error)
- func (s Server) ConfigureProvider(ctx context.Context, req *tfprotov6.ConfigureProviderRequest) (*tfprotov6.ConfigureProviderResponse, error)
- func (s Server) GenerateResourceConfig(ctx context.Context, req *tfprotov6.GenerateResourceConfigRequest) (*tfprotov6.GenerateResourceConfigResponse, error)
- func (s Server) GetFunctions(ctx context.Context, req *tfprotov6.GetFunctionsRequest) (*tfprotov6.GetFunctionsResponse, error)
- func (s Server) GetMetadata(ctx context.Context, req *tfprotov6.GetMetadataRequest) (*tfprotov6.GetMetadataResponse, error)
- func (s Server) GetProviderSchema(ctx context.Context, req *tfprotov6.GetProviderSchemaRequest) (*tfprotov6.GetProviderSchemaResponse, error)
- func (s Server) GetResourceIdentitySchemas(ctx context.Context, req *tfprotov6.GetResourceIdentitySchemasRequest) (*tfprotov6.GetResourceIdentitySchemasResponse, error)
- func (s Server) ImportResourceState(ctx context.Context, req *tfprotov6.ImportResourceStateRequest) (*tfprotov6.ImportResourceStateResponse, error)
- func (s Server) MoveResourceState(ctx context.Context, req *tfprotov6.MoveResourceStateRequest) (*tfprotov6.MoveResourceStateResponse, error)
- func (s Server) OpenEphemeralResource(ctx context.Context, req *tfprotov6.OpenEphemeralResourceRequest) (*tfprotov6.OpenEphemeralResourceResponse, error)
- func (s Server) PlanResourceChange(ctx context.Context, req *tfprotov6.PlanResourceChangeRequest) (*tfprotov6.PlanResourceChangeResponse, error)
- func (s Server) ReadDataSource(ctx context.Context, req *tfprotov6.ReadDataSourceRequest) (*tfprotov6.ReadDataSourceResponse, error)
- func (s Server) ReadResource(ctx context.Context, req *tfprotov6.ReadResourceRequest) (*tfprotov6.ReadResourceResponse, error)
- func (s Server) RenewEphemeralResource(ctx context.Context, req *tfprotov6.RenewEphemeralResourceRequest) (*tfprotov6.RenewEphemeralResourceResponse, error)
- func (s Server) StopProvider(ctx context.Context, req *tfprotov6.StopProviderRequest) (*tfprotov6.StopProviderResponse, error)
- func (s Server) UpgradeResourceIdentity(ctx context.Context, req *tfprotov6.UpgradeResourceIdentityRequest) (*tfprotov6.UpgradeResourceIdentityResponse, error)
- func (s Server) UpgradeResourceState(ctx context.Context, req *tfprotov6.UpgradeResourceStateRequest) (*tfprotov6.UpgradeResourceStateResponse, error)
- func (s Server) ValidateDataResourceConfig(ctx context.Context, req *tfprotov6.ValidateDataResourceConfigRequest) (*tfprotov6.ValidateDataResourceConfigResponse, error)
- func (s Server) ValidateEphemeralResourceConfig(ctx context.Context, req *tfprotov6.ValidateEphemeralResourceConfigRequest) (*tfprotov6.ValidateEphemeralResourceConfigResponse, error)
- func (s Server) ValidateProviderConfig(ctx context.Context, req *tfprotov6.ValidateProviderConfigRequest) (*tfprotov6.ValidateProviderConfigResponse, error)
- func (s Server) ValidateResourceConfig(ctx context.Context, req *tfprotov6.ValidateResourceConfigRequest) (*tfprotov6.ValidateResourceConfigResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDataRouter ¶
func RegisterDataRouter(router datarouter.Router) func(Server) Server
RegisterDataRouter is a functional option that registers the data source router.
func RegisterProvider ¶
RegisterProvider is a functional option that registers the Provider meta server.
func RegisterResourceRouter ¶
func RegisterResourceRouter(router resourcerouter.Router) func(Server) Server
RegisterResourceRouter is a functional option that registers the resource router.
Types ¶
type Provider ¶
type Provider interface {
Schema() *tfprotov6.Schema
MetaSchema() *tfprotov6.Schema
Validate(ctx context.Context, req *tfprotov6.ValidateProviderConfigRequest) (*tfprotov6.ValidateProviderConfigResponse, error)
Configure(ctx context.Context, req *tfprotov6.ConfigureProviderRequest) (*tfprotov6.ConfigureProviderResponse, error)
Stop(ctx context.Context, req *tfprotov6.StopProviderRequest) (*tfprotov6.StopProviderResponse, error)
Config() tftypes.Value
}
Provider is our Provider meta server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is our gRPC ProviderServer.
func (Server) ApplyResourceChange ¶
func (s Server) ApplyResourceChange(ctx context.Context, req *tfprotov6.ApplyResourceChangeRequest) (*tfprotov6.ApplyResourceChangeResponse, error)
func (Server) CallFunction ¶ added in v0.6.4
func (s Server) CallFunction(ctx context.Context, req *tfprotov6.CallFunctionRequest) (*tfprotov6.CallFunctionResponse, error)
CallFunction executes the logic of a function referenced in the configuration. This provider does not support functions.
func (Server) CloseEphemeralResource ¶ added in v0.6.4
func (s Server) CloseEphemeralResource(ctx context.Context, req *tfprotov6.CloseEphemeralResourceRequest) (*tfprotov6.CloseEphemeralResourceResponse, error)
CloseEphemeralResource closes an ephemeral resource. This provider does not support ephemeral resources.
func (Server) ConfigureProvider ¶
func (s Server) ConfigureProvider(ctx context.Context, req *tfprotov6.ConfigureProviderRequest) (*tfprotov6.ConfigureProviderResponse, error)
func (Server) GenerateResourceConfig ¶ added in v0.6.4
func (s Server) GenerateResourceConfig(ctx context.Context, req *tfprotov6.GenerateResourceConfigRequest) (*tfprotov6.GenerateResourceConfigResponse, error)
GenerateResourceConfig is called when Terraform wants to generate a resource configuration for importing to a resource address that doesn't exist yet. This provider does not support generating resource configurations.
func (Server) GetFunctions ¶ added in v0.6.4
func (s Server) GetFunctions(ctx context.Context, req *tfprotov6.GetFunctionsRequest) (*tfprotov6.GetFunctionsResponse, error)
GetFunctions returns the functions supported by the provider. This provider does not support functions.
func (Server) GetMetadata ¶
func (s Server) GetMetadata(ctx context.Context, req *tfprotov6.GetMetadataRequest) (*tfprotov6.GetMetadataResponse, error)
GetMetadata is an optional tfprotov6 API that we're shimming here to update the latest terraform-plugin-go.
func (Server) GetProviderSchema ¶
func (s Server) GetProviderSchema(ctx context.Context, req *tfprotov6.GetProviderSchemaRequest) (*tfprotov6.GetProviderSchemaResponse, error)
func (Server) GetResourceIdentitySchemas ¶ added in v0.6.4
func (s Server) GetResourceIdentitySchemas(ctx context.Context, req *tfprotov6.GetResourceIdentitySchemasRequest) (*tfprotov6.GetResourceIdentitySchemasResponse, error)
GetResourceIdentitySchemas returns the resource identity schemas for the provider. This provider does not use resource identity features, so we return an empty response.
func (Server) ImportResourceState ¶
func (s Server) ImportResourceState(ctx context.Context, req *tfprotov6.ImportResourceStateRequest) (*tfprotov6.ImportResourceStateResponse, error)
func (Server) MoveResourceState ¶ added in v0.6.4
func (s Server) MoveResourceState(ctx context.Context, req *tfprotov6.MoveResourceStateRequest) (*tfprotov6.MoveResourceStateResponse, error)
MoveResourceState is called when Terraform is asked to change a resource type for an existing resource. This provider does not support moving resource state between types.
func (Server) OpenEphemeralResource ¶ added in v0.6.4
func (s Server) OpenEphemeralResource(ctx context.Context, req *tfprotov6.OpenEphemeralResourceRequest) (*tfprotov6.OpenEphemeralResourceResponse, error)
OpenEphemeralResource opens an ephemeral resource. This provider does not support ephemeral resources.
func (Server) PlanResourceChange ¶
func (s Server) PlanResourceChange(ctx context.Context, req *tfprotov6.PlanResourceChangeRequest) (*tfprotov6.PlanResourceChangeResponse, error)
func (Server) ReadDataSource ¶
func (s Server) ReadDataSource(ctx context.Context, req *tfprotov6.ReadDataSourceRequest) (*tfprotov6.ReadDataSourceResponse, error)
func (Server) ReadResource ¶
func (s Server) ReadResource(ctx context.Context, req *tfprotov6.ReadResourceRequest) (*tfprotov6.ReadResourceResponse, error)
func (Server) RenewEphemeralResource ¶ added in v0.6.4
func (s Server) RenewEphemeralResource(ctx context.Context, req *tfprotov6.RenewEphemeralResourceRequest) (*tfprotov6.RenewEphemeralResourceResponse, error)
RenewEphemeralResource renews an ephemeral resource. This provider does not support ephemeral resources.
func (Server) StopProvider ¶
func (s Server) StopProvider(ctx context.Context, req *tfprotov6.StopProviderRequest) (*tfprotov6.StopProviderResponse, error)
func (Server) UpgradeResourceIdentity ¶ added in v0.6.4
func (s Server) UpgradeResourceIdentity(ctx context.Context, req *tfprotov6.UpgradeResourceIdentityRequest) (*tfprotov6.UpgradeResourceIdentityResponse, error)
UpgradeResourceIdentity is called when Terraform has encountered a resource with an identity state in a schema that doesn't match the schema's current version. This provider does not support resource identity upgrades.
func (Server) UpgradeResourceState ¶
func (s Server) UpgradeResourceState(ctx context.Context, req *tfprotov6.UpgradeResourceStateRequest) (*tfprotov6.UpgradeResourceStateResponse, error)
func (Server) ValidateDataResourceConfig ¶
func (s Server) ValidateDataResourceConfig(ctx context.Context, req *tfprotov6.ValidateDataResourceConfigRequest) (*tfprotov6.ValidateDataResourceConfigResponse, error)
func (Server) ValidateEphemeralResourceConfig ¶ added in v0.6.4
func (s Server) ValidateEphemeralResourceConfig(ctx context.Context, req *tfprotov6.ValidateEphemeralResourceConfigRequest) (*tfprotov6.ValidateEphemeralResourceConfigResponse, error)
ValidateEphemeralResourceConfig validates an ephemeral resource configuration. This provider does not support ephemeral resources.
func (Server) ValidateProviderConfig ¶
func (s Server) ValidateProviderConfig(ctx context.Context, req *tfprotov6.ValidateProviderConfigRequest) (*tfprotov6.ValidateProviderConfigResponse, error)
func (Server) ValidateResourceConfig ¶
func (s Server) ValidateResourceConfig(ctx context.Context, req *tfprotov6.ValidateResourceConfigRequest) (*tfprotov6.ValidateResourceConfigResponse, error)