Documentation ¶
Overview ¶
Package fwserver contains the framework provider server implementation. This package should only ever contain framework-native types, while specific protocol version compatible implementations, such as proto6server, are implemented on top of this abstraction.
Index ¶
- func AttributeModifyPlan(ctx context.Context, a fwschema.Attribute, req ModifyAttributePlanRequest, ...)
- func AttributePlanModifyBool(ctx context.Context, attribute fwxschema.AttributeWithBoolPlanModifiers, ...)
- func AttributePlanModifyDynamic(ctx context.Context, attribute fwxschema.AttributeWithDynamicPlanModifiers, ...)
- func AttributePlanModifyFloat64(ctx context.Context, attribute fwxschema.AttributeWithFloat64PlanModifiers, ...)
- func AttributePlanModifyInt64(ctx context.Context, attribute fwxschema.AttributeWithInt64PlanModifiers, ...)
- func AttributePlanModifyList(ctx context.Context, attribute fwxschema.AttributeWithListPlanModifiers, ...)
- func AttributePlanModifyMap(ctx context.Context, attribute fwxschema.AttributeWithMapPlanModifiers, ...)
- func AttributePlanModifyNumber(ctx context.Context, attribute fwxschema.AttributeWithNumberPlanModifiers, ...)
- func AttributePlanModifyObject(ctx context.Context, attribute fwxschema.AttributeWithObjectPlanModifiers, ...)
- func AttributePlanModifySet(ctx context.Context, attribute fwxschema.AttributeWithSetPlanModifiers, ...)
- func AttributePlanModifyString(ctx context.Context, attribute fwxschema.AttributeWithStringPlanModifiers, ...)
- func AttributeValidate(ctx context.Context, a fwschema.Attribute, req ValidateAttributeRequest, ...)
- func AttributeValidateBool(ctx context.Context, attribute fwxschema.AttributeWithBoolValidators, ...)
- func AttributeValidateDynamic(ctx context.Context, attribute fwxschema.AttributeWithDynamicValidators, ...)
- func AttributeValidateFloat64(ctx context.Context, attribute fwxschema.AttributeWithFloat64Validators, ...)
- func AttributeValidateInt64(ctx context.Context, attribute fwxschema.AttributeWithInt64Validators, ...)
- func AttributeValidateList(ctx context.Context, attribute fwxschema.AttributeWithListValidators, ...)
- func AttributeValidateMap(ctx context.Context, attribute fwxschema.AttributeWithMapValidators, ...)
- func AttributeValidateNestedAttributes(ctx context.Context, a fwschema.Attribute, req ValidateAttributeRequest, ...)
- func AttributeValidateNumber(ctx context.Context, attribute fwxschema.AttributeWithNumberValidators, ...)
- func AttributeValidateObject(ctx context.Context, attribute fwxschema.AttributeWithObjectValidators, ...)
- func AttributeValidateSet(ctx context.Context, attribute fwxschema.AttributeWithSetValidators, ...)
- func AttributeValidateString(ctx context.Context, attribute fwxschema.AttributeWithStringValidators, ...)
- func BlockModifyPlan(ctx context.Context, b fwschema.Block, req ModifyAttributePlanRequest, ...)
- func BlockPlanModifyList(ctx context.Context, block fwxschema.BlockWithListPlanModifiers, ...)
- func BlockPlanModifyObject(ctx context.Context, block fwxschema.BlockWithObjectPlanModifiers, ...)
- func BlockPlanModifySet(ctx context.Context, block fwxschema.BlockWithSetPlanModifiers, ...)
- func BlockValidate(ctx context.Context, b fwschema.Block, req ValidateAttributeRequest, ...)
- func BlockValidateList(ctx context.Context, block fwxschema.BlockWithListValidators, ...)
- func BlockValidateObject(ctx context.Context, block fwxschema.BlockWithObjectValidators, ...)
- func BlockValidateSet(ctx context.Context, block fwxschema.BlockWithSetValidators, ...)
- func MarkComputedNilsAsUnknown(ctx context.Context, config tftypes.Value, resourceSchema fwschema.Schema) func(*tftypes.AttributePath, tftypes.Value) (tftypes.Value, error)
- func NestedAttributeObjectPlanModify(ctx context.Context, o fwschema.NestedAttributeObject, ...)
- func NestedAttributeObjectValidate(ctx context.Context, o fwschema.NestedAttributeObject, ...)
- func NestedBlockObjectPlanModify(ctx context.Context, o fwschema.NestedBlockObject, ...)
- func NestedBlockObjectValidate(ctx context.Context, o fwschema.NestedBlockObject, ...)
- func NormaliseRequiresReplace(ctx context.Context, rs path.Paths) path.Paths
- func SchemaModifyPlan(ctx context.Context, s fwschema.Schema, req ModifySchemaPlanRequest, ...)
- func SchemaSemanticEquality(ctx context.Context, req SchemaSemanticEqualityRequest, ...)
- func SchemaValidate(ctx context.Context, s fwschema.Schema, req ValidateSchemaRequest, ...)
- type ApplyResourceChangeRequest
- type ApplyResourceChangeResponse
- type CallFunctionRequest
- type CallFunctionResponse
- type CreateResourceRequest
- type CreateResourceResponse
- type DataSourceMetadata
- type DeleteResourceRequest
- type DeleteResourceResponse
- type FunctionMetadata
- type GetFunctionsRequest
- type GetFunctionsResponse
- type GetMetadataRequest
- type GetMetadataResponse
- type GetProviderSchemaRequest
- type GetProviderSchemaResponse
- type ImportResourceStateRequest
- type ImportResourceStateResponse
- type ImportedResource
- type ModifyAttributePlanRequest
- type ModifyAttributePlanResponse
- type ModifySchemaPlanRequest
- type ModifySchemaPlanResponse
- type MoveResourceStateRequest
- type MoveResourceStateResponse
- type PlanResourceChangeRequest
- type PlanResourceChangeResponse
- type ReadDataSourceRequest
- type ReadDataSourceResponse
- type ReadResourceRequest
- type ReadResourceResponse
- type ResourceMetadata
- type SchemaSemanticEqualityRequest
- type SchemaSemanticEqualityResponse
- type Server
- func (s *Server) ApplyResourceChange(ctx context.Context, req *ApplyResourceChangeRequest, ...)
- func (s *Server) CallFunction(ctx context.Context, req *CallFunctionRequest, resp *CallFunctionResponse)
- func (s *Server) ConfigureProvider(ctx context.Context, req *provider.ConfigureRequest, ...)
- func (s *Server) CreateResource(ctx context.Context, req *CreateResourceRequest, resp *CreateResourceResponse)
- func (s *Server) DataSource(ctx context.Context, typeName string) (datasource.DataSource, diag.Diagnostics)
- func (s *Server) DataSourceFuncs(ctx context.Context) (map[string]func() datasource.DataSource, diag.Diagnostics)
- func (s *Server) DataSourceMetadatas(ctx context.Context) ([]DataSourceMetadata, diag.Diagnostics)
- func (s *Server) DataSourceSchema(ctx context.Context, typeName string) (fwschema.Schema, diag.Diagnostics)
- func (s *Server) DataSourceSchemas(ctx context.Context) (map[string]fwschema.Schema, diag.Diagnostics)
- func (s *Server) DeleteResource(ctx context.Context, req *DeleteResourceRequest, resp *DeleteResourceResponse)
- func (s *Server) Function(ctx context.Context, name string) (function.Function, *function.FuncError)
- func (s *Server) FunctionDefinition(ctx context.Context, name string) (function.Definition, *function.FuncError)
- func (s *Server) FunctionDefinitions(ctx context.Context) (map[string]function.Definition, diag.Diagnostics)
- func (s *Server) FunctionFuncs(ctx context.Context) (map[string]func() function.Function, diag.Diagnostics)
- func (s *Server) FunctionMetadatas(ctx context.Context) ([]FunctionMetadata, diag.Diagnostics)
- func (s *Server) GetFunctions(ctx context.Context, req *GetFunctionsRequest, resp *GetFunctionsResponse)
- func (s *Server) GetMetadata(ctx context.Context, req *GetMetadataRequest, resp *GetMetadataResponse)
- func (s *Server) GetProviderSchema(ctx context.Context, req *GetProviderSchemaRequest, ...)
- func (s *Server) ImportResourceState(ctx context.Context, req *ImportResourceStateRequest, ...)
- func (s *Server) MoveResourceState(ctx context.Context, req *MoveResourceStateRequest, ...)
- func (s *Server) PlanResourceChange(ctx context.Context, req *PlanResourceChangeRequest, ...)
- func (s *Server) ProviderMetaSchema(ctx context.Context) (fwschema.Schema, diag.Diagnostics)
- func (s *Server) ProviderSchema(ctx context.Context) (fwschema.Schema, diag.Diagnostics)
- func (s *Server) ProviderTypeName(ctx context.Context) string
- func (s *Server) ReadDataSource(ctx context.Context, req *ReadDataSourceRequest, resp *ReadDataSourceResponse)
- func (s *Server) ReadResource(ctx context.Context, req *ReadResourceRequest, resp *ReadResourceResponse)
- func (s *Server) Resource(ctx context.Context, typeName string) (resource.Resource, diag.Diagnostics)
- func (s *Server) ResourceFuncs(ctx context.Context) (map[string]func() resource.Resource, diag.Diagnostics)
- func (s *Server) ResourceMetadatas(ctx context.Context) ([]ResourceMetadata, diag.Diagnostics)
- func (s *Server) ResourceSchema(ctx context.Context, typeName string) (fwschema.Schema, diag.Diagnostics)
- func (s *Server) ResourceSchemas(ctx context.Context) (map[string]fwschema.Schema, diag.Diagnostics)
- func (s *Server) ServerCapabilities() *ServerCapabilities
- func (s *Server) UpdateResource(ctx context.Context, req *UpdateResourceRequest, resp *UpdateResourceResponse)
- func (s *Server) UpgradeResourceState(ctx context.Context, req *UpgradeResourceStateRequest, ...)
- func (s *Server) ValidateDataSourceConfig(ctx context.Context, req *ValidateDataSourceConfigRequest, ...)
- func (s *Server) ValidateProviderConfig(ctx context.Context, req *ValidateProviderConfigRequest, ...)
- func (s *Server) ValidateResourceConfig(ctx context.Context, req *ValidateResourceConfigRequest, ...)
- type ServerCapabilities
- type UpdateResourceRequest
- type UpdateResourceResponse
- type UpgradeResourceStateRequest
- type UpgradeResourceStateResponse
- type ValidateAttributeRequest
- type ValidateAttributeResponse
- type ValidateDataSourceConfigRequest
- type ValidateDataSourceConfigResponse
- type ValidateProviderConfigRequest
- type ValidateProviderConfigResponse
- type ValidateResourceConfigRequest
- type ValidateResourceConfigResponse
- type ValidateSchemaRequest
- type ValidateSchemaResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeModifyPlan ¶ added in v0.9.0
func AttributeModifyPlan(ctx context.Context, a fwschema.Attribute, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributeModifyPlan runs all AttributePlanModifiers
TODO: Clean up this abstraction back into an internal Attribute type method. The extra Attribute parameter is a carry-over of creating the proto6server package from the tfsdk package and not wanting to export the method. Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/365
func AttributePlanModifyBool ¶ added in v0.17.0
func AttributePlanModifyBool(ctx context.Context, attribute fwxschema.AttributeWithBoolPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifyBool performs all types.Bool plan modification.
func AttributePlanModifyDynamic ¶ added in v1.7.0
func AttributePlanModifyDynamic(ctx context.Context, attribute fwxschema.AttributeWithDynamicPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifyDynamic performs all types.Dynamic plan modification.
func AttributePlanModifyFloat64 ¶ added in v0.17.0
func AttributePlanModifyFloat64(ctx context.Context, attribute fwxschema.AttributeWithFloat64PlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifyFloat64 performs all types.Float64 plan modification.
func AttributePlanModifyInt64 ¶ added in v0.17.0
func AttributePlanModifyInt64(ctx context.Context, attribute fwxschema.AttributeWithInt64PlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifyInt64 performs all types.Int64 plan modification.
func AttributePlanModifyList ¶ added in v0.17.0
func AttributePlanModifyList(ctx context.Context, attribute fwxschema.AttributeWithListPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifyList performs all types.List plan modification.
func AttributePlanModifyMap ¶ added in v0.17.0
func AttributePlanModifyMap(ctx context.Context, attribute fwxschema.AttributeWithMapPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifyMap performs all types.Map plan modification.
func AttributePlanModifyNumber ¶ added in v0.17.0
func AttributePlanModifyNumber(ctx context.Context, attribute fwxschema.AttributeWithNumberPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifyNumber performs all types.Number plan modification.
func AttributePlanModifyObject ¶ added in v0.17.0
func AttributePlanModifyObject(ctx context.Context, attribute fwxschema.AttributeWithObjectPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifyObject performs all types.Object plan modification.
func AttributePlanModifySet ¶ added in v0.17.0
func AttributePlanModifySet(ctx context.Context, attribute fwxschema.AttributeWithSetPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifySet performs all types.Set plan modification.
func AttributePlanModifyString ¶ added in v0.17.0
func AttributePlanModifyString(ctx context.Context, attribute fwxschema.AttributeWithStringPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
AttributePlanModifyString performs all types.String plan modification.
func AttributeValidate ¶ added in v0.9.0
func AttributeValidate(ctx context.Context, a fwschema.Attribute, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidate performs all Attribute validation.
TODO: Clean up this abstraction back into an internal Attribute type method. The extra Attribute parameter is a carry-over of creating the proto6server package from the tfsdk package and not wanting to export the method. Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/365
func AttributeValidateBool ¶ added in v0.17.0
func AttributeValidateBool(ctx context.Context, attribute fwxschema.AttributeWithBoolValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateBool performs all types.Bool validation.
func AttributeValidateDynamic ¶ added in v1.7.0
func AttributeValidateDynamic(ctx context.Context, attribute fwxschema.AttributeWithDynamicValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateDynamic performs all types.Dynamic validation.
func AttributeValidateFloat64 ¶ added in v0.17.0
func AttributeValidateFloat64(ctx context.Context, attribute fwxschema.AttributeWithFloat64Validators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateFloat64 performs all types.Float64 validation.
func AttributeValidateInt64 ¶ added in v0.17.0
func AttributeValidateInt64(ctx context.Context, attribute fwxschema.AttributeWithInt64Validators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateInt64 performs all types.Int64 validation.
func AttributeValidateList ¶ added in v0.17.0
func AttributeValidateList(ctx context.Context, attribute fwxschema.AttributeWithListValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateList performs all types.List validation.
func AttributeValidateMap ¶ added in v0.17.0
func AttributeValidateMap(ctx context.Context, attribute fwxschema.AttributeWithMapValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateMap performs all types.Map validation.
func AttributeValidateNestedAttributes ¶ added in v0.9.0
func AttributeValidateNestedAttributes(ctx context.Context, a fwschema.Attribute, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateNestedAttributes performs all nested Attributes validation.
TODO: Clean up this abstraction back into an internal Attribute type method. The extra Attribute parameter is a carry-over of creating the proto6server package from the tfsdk package and not wanting to export the method. Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/365
func AttributeValidateNumber ¶ added in v0.17.0
func AttributeValidateNumber(ctx context.Context, attribute fwxschema.AttributeWithNumberValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateNumber performs all types.Number validation.
func AttributeValidateObject ¶ added in v0.17.0
func AttributeValidateObject(ctx context.Context, attribute fwxschema.AttributeWithObjectValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateObject performs all types.Object validation.
func AttributeValidateSet ¶ added in v0.17.0
func AttributeValidateSet(ctx context.Context, attribute fwxschema.AttributeWithSetValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateSet performs all types.Set validation.
func AttributeValidateString ¶ added in v0.17.0
func AttributeValidateString(ctx context.Context, attribute fwxschema.AttributeWithStringValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
AttributeValidateString performs all types.String validation.
func BlockModifyPlan ¶ added in v0.9.0
func BlockModifyPlan(ctx context.Context, b fwschema.Block, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
BlockModifyPlan performs all Block plan modification.
TODO: Clean up this abstraction back into an internal Block type method. The extra Block parameter is a carry-over of creating the proto6server package from the tfsdk package and not wanting to export the method. Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/365
func BlockPlanModifyList ¶ added in v0.17.0
func BlockPlanModifyList(ctx context.Context, block fwxschema.BlockWithListPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
BlockPlanModifyList performs all types.List plan modification.
func BlockPlanModifyObject ¶ added in v0.17.0
func BlockPlanModifyObject(ctx context.Context, block fwxschema.BlockWithObjectPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
BlockPlanModifyObject performs all types.Object plan modification.
func BlockPlanModifySet ¶ added in v0.17.0
func BlockPlanModifySet(ctx context.Context, block fwxschema.BlockWithSetPlanModifiers, req ModifyAttributePlanRequest, resp *ModifyAttributePlanResponse)
BlockPlanModifySet performs all types.Set plan modification.
func BlockValidate ¶ added in v0.9.0
func BlockValidate(ctx context.Context, b fwschema.Block, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
BlockValidate performs all Block validation.
TODO: Clean up this abstraction back into an internal Block type method. The extra Block parameter is a carry-over of creating the proto6server package from the tfsdk package and not wanting to export the method. Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/365
func BlockValidateList ¶ added in v0.17.0
func BlockValidateList(ctx context.Context, block fwxschema.BlockWithListValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
BlockValidateList performs all types.List validation.
func BlockValidateObject ¶ added in v0.17.0
func BlockValidateObject(ctx context.Context, block fwxschema.BlockWithObjectValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
BlockValidateObject performs all types.Object validation.
func BlockValidateSet ¶ added in v0.17.0
func BlockValidateSet(ctx context.Context, block fwxschema.BlockWithSetValidators, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
BlockValidateSet performs all types.Set validation.
func MarkComputedNilsAsUnknown ¶ added in v0.9.0
func NestedAttributeObjectPlanModify ¶ added in v0.17.0
func NestedAttributeObjectPlanModify(ctx context.Context, o fwschema.NestedAttributeObject, req planmodifier.ObjectRequest, resp *ModifyAttributePlanResponse)
func NestedAttributeObjectValidate ¶ added in v0.17.0
func NestedAttributeObjectValidate(ctx context.Context, o fwschema.NestedAttributeObject, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
func NestedBlockObjectPlanModify ¶ added in v0.17.0
func NestedBlockObjectPlanModify(ctx context.Context, o fwschema.NestedBlockObject, req planmodifier.ObjectRequest, resp *ModifyAttributePlanResponse)
func NestedBlockObjectValidate ¶ added in v0.17.0
func NestedBlockObjectValidate(ctx context.Context, o fwschema.NestedBlockObject, req ValidateAttributeRequest, resp *ValidateAttributeResponse)
func NormaliseRequiresReplace ¶ added in v0.9.0
NormaliseRequiresReplace sorts and deduplicates the slice of AttributePaths used in the RequiresReplace response field. Sorting is lexical based on the string representation of each AttributePath.
func SchemaModifyPlan ¶ added in v0.9.0
func SchemaModifyPlan(ctx context.Context, s fwschema.Schema, req ModifySchemaPlanRequest, resp *ModifySchemaPlanResponse)
SchemaModifyPlan runs all AttributePlanModifiers in all schema attributes and blocks.
TODO: Clean up this abstraction back into an internal Schema type method. The extra Schema parameter is a carry-over of creating the proto6server package from the tfsdk package and not wanting to export the method. Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/365
func SchemaSemanticEquality ¶ added in v1.3.0
func SchemaSemanticEquality(ctx context.Context, req SchemaSemanticEqualityRequest, resp *SchemaSemanticEqualityResponse)
SchemaSemanticEquality runs semantic equality logic for all schema attributes and blocks.
MAINTAINER NOTE: Since semantic equality is purely value based, where attributes and blocks cannot currently introduce semantic equality logic based on those schema concepts, this logic immediately delegates to value based handling. On the off chance that the framework is enhanced with attribute and block level semantic equality support (not recommended since value types should really be the correct provider developer abstraction, rather than potentially causing confusing or duplicated provider logic), this logic will need to be redesigned similar to the plan modification and validation logic which walks the schema. That schema walk may interfere with the value based recursion for collection and structural types, so additional design may be necessary so that provider developer data handling intentions are kept based on both the value based logic and schema based logic.
func SchemaValidate ¶ added in v0.9.0
func SchemaValidate(ctx context.Context, s fwschema.Schema, req ValidateSchemaRequest, resp *ValidateSchemaResponse)
SchemaValidate performs all Attribute and Block validation.
TODO: Clean up this abstraction back into an internal Schema type method. The extra Schema parameter is a carry-over of creating the proto6server package from the tfsdk package and not wanting to export the method. Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/365
Types ¶
type ApplyResourceChangeRequest ¶ added in v0.9.0
type ApplyResourceChangeRequest struct { Config *tfsdk.Config PlannedPrivate *privatestate.Data PlannedState *tfsdk.Plan PriorState *tfsdk.State ProviderMeta *tfsdk.Config ResourceSchema fwschema.Schema Resource resource.Resource }
ApplyResourceChangeRequest is the framework server request for the ApplyResourceChange RPC.
type ApplyResourceChangeResponse ¶ added in v0.9.0
type ApplyResourceChangeResponse struct { Diagnostics diag.Diagnostics NewState *tfsdk.State Private *privatestate.Data }
ApplyResourceChangeResponse is the framework server response for the ApplyResourceChange RPC.
type CallFunctionRequest ¶ added in v1.5.0
type CallFunctionRequest struct { Arguments function.ArgumentsData Function function.Function FunctionDefinition function.Definition }
CallFunctionRequest is the framework server request for the CallFunction RPC.
type CallFunctionResponse ¶ added in v1.5.0
type CallFunctionResponse struct { Error *function.FuncError Result function.ResultData }
CallFunctionResponse is the framework server response for the CallFunction RPC.
type CreateResourceRequest ¶ added in v0.9.0
type CreateResourceRequest struct { Config *tfsdk.Config PlannedPrivate *privatestate.Data PlannedState *tfsdk.Plan ProviderMeta *tfsdk.Config ResourceSchema fwschema.Schema Resource resource.Resource }
CreateResourceRequest is the framework server request for a create request with the ApplyResourceChange RPC.
type CreateResourceResponse ¶ added in v0.9.0
type CreateResourceResponse struct { Diagnostics diag.Diagnostics NewState *tfsdk.State Private *privatestate.Data }
CreateResourceResponse is the framework server response for a create request with the ApplyResourceChange RPC.
type DataSourceMetadata ¶ added in v1.4.0
type DataSourceMetadata struct { // TypeName is the name of the data resource. TypeName string }
DataSourceMetadata is the framework server equivalent of the tfprotov5.DataSourceMetadata and tfprotov6.DataSourceMetadata types.
type DeleteResourceRequest ¶ added in v0.9.0
type DeleteResourceRequest struct { PlannedPrivate *privatestate.Data PriorState *tfsdk.State ProviderMeta *tfsdk.Config ResourceSchema fwschema.Schema Resource resource.Resource }
DeleteResourceRequest is the framework server request for a delete request with the ApplyResourceChange RPC.
type DeleteResourceResponse ¶ added in v0.9.0
type DeleteResourceResponse struct { Diagnostics diag.Diagnostics NewState *tfsdk.State Private *privatestate.Data }
DeleteResourceResponse is the framework server response for a delete request with the ApplyResourceChange RPC.
type FunctionMetadata ¶ added in v1.5.0
type FunctionMetadata struct { // Name is the name of the function. Name string }
FunctionMetadata is the framework server equivalent of the tfprotov5.FunctionMetadata and tfprotov6.FunctionMetadata types.
type GetFunctionsRequest ¶ added in v1.5.0
type GetFunctionsRequest struct{}
GetFunctionsRequest is the framework server request for the GetFunctions RPC.
type GetFunctionsResponse ¶ added in v1.5.0
type GetFunctionsResponse struct { FunctionDefinitions map[string]function.Definition Diagnostics diag.Diagnostics }
GetFunctionsResponse is the framework server response for the GetFunctions RPC.
type GetMetadataRequest ¶ added in v1.4.0
type GetMetadataRequest struct{}
GetMetadataRequest is the framework server request for the GetMetadata RPC.
type GetMetadataResponse ¶ added in v1.4.0
type GetMetadataResponse struct { DataSources []DataSourceMetadata Diagnostics diag.Diagnostics Functions []FunctionMetadata Resources []ResourceMetadata ServerCapabilities *ServerCapabilities }
GetMetadataResponse is the framework server response for the GetMetadata RPC.
type GetProviderSchemaRequest ¶
type GetProviderSchemaRequest struct{}
GetProviderSchemaRequest is the framework server request for the GetProviderSchema RPC.
type GetProviderSchemaResponse ¶
type GetProviderSchemaResponse struct { ServerCapabilities *ServerCapabilities Provider fwschema.Schema ProviderMeta fwschema.Schema ResourceSchemas map[string]fwschema.Schema DataSourceSchemas map[string]fwschema.Schema FunctionDefinitions map[string]function.Definition Diagnostics diag.Diagnostics }
GetProviderSchemaResponse is the framework server response for the GetProviderSchema RPC.
type ImportResourceStateRequest ¶ added in v0.9.0
type ImportResourceStateRequest struct { ID string Resource resource.Resource // EmptyState is an empty State for the resource schema. This is used to // initialize the ImportedResource State of the ImportResourceStateResponse // and allow the framework server to verify that the provider updated the // state after the provider defined logic. EmptyState tfsdk.State // TypeName is the resource type name, which is necessary for populating // the ImportedResource TypeName of the ImportResourceStateResponse. TypeName string }
ImportResourceStateRequest is the framework server request for the ImportResourceState RPC.
type ImportResourceStateResponse ¶ added in v0.9.0
type ImportResourceStateResponse struct { Diagnostics diag.Diagnostics ImportedResources []ImportedResource }
ImportResourceStateResponse is the framework server response for the ImportResourceState RPC.
type ImportedResource ¶ added in v0.9.0
type ImportedResource struct { Private *privatestate.Data State tfsdk.State TypeName string }
ImportedResource represents a resource that was imported.
type ModifyAttributePlanRequest ¶ added in v1.0.0
type ModifyAttributePlanRequest struct { // AttributePath is the path of the attribute. Use this path for any // response diagnostics. AttributePath path.Path // AttributePathExpression is the expression matching the exact path of the // attribute. AttributePathExpression path.Expression // Config is the configuration the user supplied for the resource. Config tfsdk.Config // State is the current state of the resource. State tfsdk.State // Plan is the planned new state for the resource. Plan tfsdk.Plan // AttributeConfig is the configuration the user supplied for the attribute. AttributeConfig attr.Value // AttributeState is the current state of the attribute. AttributeState attr.Value // AttributePlan is the planned new state for the attribute. AttributePlan attr.Value // ProviderMeta is metadata from the provider_meta block of the module. ProviderMeta tfsdk.Config // Private is provider-defined resource private state data which was previously // stored with the resource state. This data is opaque to Terraform and does // not affect plan output. Any existing data is copied to // ModifyAttributePlanResponse.Private to prevent accidental private state data loss. // // The private state data is always the original data when the schema-based plan // modification began or, is updated as the logic traverses deeper into underlying // attributes. // // Use the GetKey method to read data. Use the SetKey method on // ModifyAttributePlanResponse.Private to update or remove a value. Private *privatestate.ProviderData }
ModifyAttributePlanRequest represents a request for the provider to modify an attribute value, or mark it as requiring replacement, at plan time. An instance of this request struct is supplied as an argument to the Modify function of an attribute's plan modifier(s).
type ModifyAttributePlanResponse ¶ added in v0.12.0
type ModifyAttributePlanResponse struct { AttributePlan attr.Value Diagnostics diag.Diagnostics RequiresReplace path.Paths Private *privatestate.ProviderData }
type ModifySchemaPlanRequest ¶ added in v0.9.0
type ModifySchemaPlanRequest struct { // Config is the configuration the user supplied for the resource. Config tfsdk.Config // State is the current state of the resource. State tfsdk.State // Plan is the planned new state for the resource. Plan tfsdk.Plan // ProviderMeta is metadata from the provider_meta block of the module. ProviderMeta tfsdk.Config // Private is provider private state data. Private *privatestate.ProviderData }
ModifySchemaPlanRequest represents a request for a schema to run all attribute plan modification functions.
type ModifySchemaPlanResponse ¶ added in v0.9.0
type ModifySchemaPlanResponse struct { // Plan is the planned new state for the resource. Plan tfsdk.Plan // RequiresReplace is a list of attribute paths that require the // resource to be replaced. They should point to the specific field // that changed that requires the resource to be destroyed and // recreated. RequiresReplace path.Paths // Private is provider private state data following potential modifications. Private *privatestate.ProviderData // Diagnostics report errors or warnings related to running all attribute // plan modifiers. Returning an empty slice indicates a successful // plan modification with no warnings or errors generated. Diagnostics diag.Diagnostics }
ModifySchemaPlanResponse represents a response to a ModifySchemaPlanRequest.
type MoveResourceStateRequest ¶ added in v1.6.0
type MoveResourceStateRequest struct { // SourcePrivate is the private state of the source resource as given by // Terraform across the protocol. SourcePrivate *privatestate.Data // SourceProviderAddress is the address of the source provider as given by // Terraform across the protocol. SourceProviderAddress string // SourceSchemaVersion is the version of the source resource schema as given // by Terraform across the protocol. SourceSchemaVersion int64 // SourceRawState is the raw state of the source resource as given by // Terraform across the protocol. // // Using the tfprotov6 type here was a pragmatic effort decision around when // the framework introduced compatibility promises. This type was chosen as // it was readily available and trivial to convert between tfprotov5. // // Using a terraform-plugin-go type is not ideal for the framework as almost // all terraform-plugin-go types have framework abstractions, but if there // is ever a time where it makes sense to re-evaluate this decision, such as // a major version bump, it could be changed then. // Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/340 SourceRawState *tfprotov6.RawState // SourceTypeName is the type name of the source resource as given by // Terraform across the protocol. SourceTypeName string // TargetResource is the provider-defined resource implementation as // determined by the framework looking up the resource name from the // provider.Provider implementation Resources method defined by the // provider developer. TargetResource resource.Resource // TargetResourceSchema is the evaluated schema definition of the target // resource as determined by the framework calling the resource.Resource // implementation Schema method defined by the provider developer. TargetResourceSchema fwschema.Schema // TargetTypeName is the type name of the target resource as given by // Terraform across the protocol. TargetTypeName string }
MoveResourceStateRequest is the framework server request for the MoveResourceState RPC.
type MoveResourceStateResponse ¶ added in v1.6.0
type MoveResourceStateResponse struct { Diagnostics diag.Diagnostics TargetPrivate *privatestate.Data TargetState *tfsdk.State }
MoveResourceStateResponse is the framework server response for the MoveResourceState RPC.
type PlanResourceChangeRequest ¶ added in v0.9.0
type PlanResourceChangeRequest struct { Config *tfsdk.Config PriorPrivate *privatestate.Data PriorState *tfsdk.State ProposedNewState *tfsdk.Plan ProviderMeta *tfsdk.Config ResourceSchema fwschema.Schema Resource resource.Resource }
PlanResourceChangeRequest is the framework server request for the PlanResourceChange RPC.
type PlanResourceChangeResponse ¶ added in v0.9.0
type PlanResourceChangeResponse struct { Diagnostics diag.Diagnostics PlannedPrivate *privatestate.Data PlannedState *tfsdk.State RequiresReplace path.Paths }
PlanResourceChangeResponse is the framework server response for the PlanResourceChange RPC.
type ReadDataSourceRequest ¶ added in v0.9.0
type ReadDataSourceRequest struct { Config *tfsdk.Config DataSourceSchema fwschema.Schema DataSource datasource.DataSource ProviderMeta *tfsdk.Config }
ReadDataSourceRequest is the framework server request for the ReadDataSource RPC.
type ReadDataSourceResponse ¶ added in v0.9.0
type ReadDataSourceResponse struct { Diagnostics diag.Diagnostics State *tfsdk.State }
ReadDataSourceResponse is the framework server response for the ReadDataSource RPC.
type ReadResourceRequest ¶ added in v0.9.0
type ReadResourceRequest struct { CurrentState *tfsdk.State Resource resource.Resource Private *privatestate.Data ProviderMeta *tfsdk.Config }
ReadResourceRequest is the framework server request for the ReadResource RPC.
type ReadResourceResponse ¶ added in v0.9.0
type ReadResourceResponse struct { Diagnostics diag.Diagnostics NewState *tfsdk.State Private *privatestate.Data }
ReadResourceResponse is the framework server response for the ReadResource RPC.
type ResourceMetadata ¶ added in v1.4.0
type ResourceMetadata struct { // TypeName is the name of the managed resource. TypeName string }
ResourceMetadata is the framework server equivalent of the tfprotov5.ResourceMetadata and tfprotov6.ResourceMetadata types.
type SchemaSemanticEqualityRequest ¶ added in v1.3.0
type SchemaSemanticEqualityRequest struct { // PriorData is the prior schema-based data. PriorData fwschemadata.Data // ProposedNewData is the proposed new schema-based data. The response // NewData contains the results of any modifications. ProposedNewData fwschemadata.Data }
SchemaSemanticEqualityRequest represents a request for a schema to run all semantic equality logic.
type SchemaSemanticEqualityResponse ¶ added in v1.3.0
type SchemaSemanticEqualityResponse struct { // NewData is the new schema-based data after any modifications. NewData fwschemadata.Data // Diagnostics report errors or warnings related to running all attribute // plan modifiers. Returning an empty slice indicates a successful // plan modification with no warnings or errors generated. Diagnostics diag.Diagnostics }
SchemaSemanticEqualityResponse represents a response to a SchemaSemanticEqualityRequest.
type Server ¶
type Server struct { Provider provider.Provider // DataSourceConfigureData is the // [provider.ConfigureResponse.DataSourceData] field value which is passed // to [datasource.ConfigureRequest.ProviderData]. DataSourceConfigureData any // ResourceConfigureData is the // [provider.ConfigureResponse.ResourceData] field value which is passed // to [resource.ConfigureRequest.ProviderData]. ResourceConfigureData any // contains filtered or unexported fields }
Server implements the framework provider server. Protocol specific implementations wrap this handling along with calling all request and response type conversions.
func (*Server) ApplyResourceChange ¶ added in v0.9.0
func (s *Server) ApplyResourceChange(ctx context.Context, req *ApplyResourceChangeRequest, resp *ApplyResourceChangeResponse)
ApplyResourceChange implements the framework server ApplyResourceChange RPC.
func (*Server) CallFunction ¶ added in v1.5.0
func (s *Server) CallFunction(ctx context.Context, req *CallFunctionRequest, resp *CallFunctionResponse)
CallFunction implements the framework server CallFunction RPC.
func (*Server) ConfigureProvider ¶ added in v0.9.0
func (s *Server) ConfigureProvider(ctx context.Context, req *provider.ConfigureRequest, resp *provider.ConfigureResponse)
ConfigureProvider implements the framework server ConfigureProvider RPC.
func (*Server) CreateResource ¶ added in v0.9.0
func (s *Server) CreateResource(ctx context.Context, req *CreateResourceRequest, resp *CreateResourceResponse)
CreateResource implements the framework server create request logic for the ApplyResourceChange RPC.
func (*Server) DataSource ¶ added in v0.12.0
func (s *Server) DataSource(ctx context.Context, typeName string) (datasource.DataSource, diag.Diagnostics)
DataSource returns the DataSource for a given type name.
func (*Server) DataSourceFuncs ¶ added in v0.12.0
func (s *Server) DataSourceFuncs(ctx context.Context) (map[string]func() datasource.DataSource, diag.Diagnostics)
DataSourceFuncs returns a map of DataSource functions. The results are cached on first use.
func (*Server) DataSourceMetadatas ¶ added in v1.4.0
func (s *Server) DataSourceMetadatas(ctx context.Context) ([]DataSourceMetadata, diag.Diagnostics)
DataSourceMetadatas returns a slice of DataSourceMetadata for the GetMetadata RPC.
func (*Server) DataSourceSchema ¶ added in v0.9.0
func (s *Server) DataSourceSchema(ctx context.Context, typeName string) (fwschema.Schema, diag.Diagnostics)
DataSourceSchema returns the DataSource Schema for the given type name and caches the result for later DataSource operations.
func (*Server) DataSourceSchemas ¶ added in v0.9.0
func (s *Server) DataSourceSchemas(ctx context.Context) (map[string]fwschema.Schema, diag.Diagnostics)
DataSourceSchemas returns a map of DataSource Schemas for the GetProviderSchema RPC without caching since not all schemas are guaranteed to be necessary for later provider operations. The schema implementations are also validated.
func (*Server) DeleteResource ¶ added in v0.9.0
func (s *Server) DeleteResource(ctx context.Context, req *DeleteResourceRequest, resp *DeleteResourceResponse)
DeleteResource implements the framework server delete request logic for the ApplyResourceChange RPC.
func (*Server) Function ¶ added in v1.5.0
func (s *Server) Function(ctx context.Context, name string) (function.Function, *function.FuncError)
Function returns the Function for a given name.
func (*Server) FunctionDefinition ¶ added in v1.5.0
func (s *Server) FunctionDefinition(ctx context.Context, name string) (function.Definition, *function.FuncError)
FunctionDefinition returns the Function Definition for the given name and caches the result for later Function operations.
func (*Server) FunctionDefinitions ¶ added in v1.5.0
func (s *Server) FunctionDefinitions(ctx context.Context) (map[string]function.Definition, diag.Diagnostics)
FunctionDefinitions returns a map of Function Definitions for the GetProviderSchema RPC without caching since not all definitions are guaranteed to be necessary for later provider operations. The definition implementations are also validated.
func (*Server) FunctionFuncs ¶ added in v1.5.0
func (s *Server) FunctionFuncs(ctx context.Context) (map[string]func() function.Function, diag.Diagnostics)
FunctionFuncs returns a map of Function functions. The results are cached on first use.
func (*Server) FunctionMetadatas ¶ added in v1.5.0
func (s *Server) FunctionMetadatas(ctx context.Context) ([]FunctionMetadata, diag.Diagnostics)
FunctionMetadatas returns a slice of FunctionMetadata for the GetMetadata RPC.
func (*Server) GetFunctions ¶ added in v1.5.0
func (s *Server) GetFunctions(ctx context.Context, req *GetFunctionsRequest, resp *GetFunctionsResponse)
GetFunctions implements the framework server GetFunctions RPC.
func (*Server) GetMetadata ¶ added in v1.4.0
func (s *Server) GetMetadata(ctx context.Context, req *GetMetadataRequest, resp *GetMetadataResponse)
GetMetadata implements the framework server GetMetadata RPC.
func (*Server) GetProviderSchema ¶
func (s *Server) GetProviderSchema(ctx context.Context, req *GetProviderSchemaRequest, resp *GetProviderSchemaResponse)
GetProviderSchema implements the framework server GetProviderSchema RPC.
func (*Server) ImportResourceState ¶ added in v0.9.0
func (s *Server) ImportResourceState(ctx context.Context, req *ImportResourceStateRequest, resp *ImportResourceStateResponse)
ImportResourceState implements the framework server ImportResourceState RPC.
func (*Server) MoveResourceState ¶ added in v1.6.0
func (s *Server) MoveResourceState(ctx context.Context, req *MoveResourceStateRequest, resp *MoveResourceStateResponse)
MoveResourceState implements the framework server MoveResourceState RPC.
func (*Server) PlanResourceChange ¶ added in v0.9.0
func (s *Server) PlanResourceChange(ctx context.Context, req *PlanResourceChangeRequest, resp *PlanResourceChangeResponse)
PlanResourceChange implements the framework server PlanResourceChange RPC.
func (*Server) ProviderMetaSchema ¶ added in v0.9.0
ProviderMetaSchema returns the Meta Schema associated with the Provider, if it implements the ProviderWithMetaSchema interface. The Schema and Diagnostics are cached on first use.
func (*Server) ProviderSchema ¶ added in v0.9.0
ProviderSchema returns the Schema associated with the Provider. The Schema and Diagnostics are cached on first use.
func (*Server) ProviderTypeName ¶ added in v1.4.1
ProviderTypeName returns the TypeName associated with the Provider. The TypeName is cached on first use.
func (*Server) ReadDataSource ¶ added in v0.9.0
func (s *Server) ReadDataSource(ctx context.Context, req *ReadDataSourceRequest, resp *ReadDataSourceResponse)
ReadDataSource implements the framework server ReadDataSource RPC.
func (*Server) ReadResource ¶ added in v0.9.0
func (s *Server) ReadResource(ctx context.Context, req *ReadResourceRequest, resp *ReadResourceResponse)
ReadResource implements the framework server ReadResource RPC.
func (*Server) Resource ¶ added in v0.12.0
func (s *Server) Resource(ctx context.Context, typeName string) (resource.Resource, diag.Diagnostics)
Resource returns the Resource for a given type name.
func (*Server) ResourceFuncs ¶ added in v0.12.0
func (s *Server) ResourceFuncs(ctx context.Context) (map[string]func() resource.Resource, diag.Diagnostics)
ResourceFuncs returns a map of Resource functions. The results are cached on first use.
func (*Server) ResourceMetadatas ¶ added in v1.4.0
func (s *Server) ResourceMetadatas(ctx context.Context) ([]ResourceMetadata, diag.Diagnostics)
ResourceMetadatas returns a slice of ResourceMetadata for the GetMetadata RPC.
func (*Server) ResourceSchema ¶ added in v0.9.0
func (s *Server) ResourceSchema(ctx context.Context, typeName string) (fwschema.Schema, diag.Diagnostics)
ResourceSchema returns the Resource Schema for the given type name and caches the result for later Resource operations.
func (*Server) ResourceSchemas ¶ added in v0.9.0
func (s *Server) ResourceSchemas(ctx context.Context) (map[string]fwschema.Schema, diag.Diagnostics)
ResourceSchemas returns a map of Resource Schemas for the GetProviderSchema RPC without caching since not all schemas are guaranteed to be necessary for later provider operations. The schema implementations are also validated.
func (*Server) ServerCapabilities ¶ added in v1.4.0
func (s *Server) ServerCapabilities() *ServerCapabilities
ServerCapabilities returns the server capabilities.
func (*Server) UpdateResource ¶ added in v0.9.0
func (s *Server) UpdateResource(ctx context.Context, req *UpdateResourceRequest, resp *UpdateResourceResponse)
UpdateResource implements the framework server update request logic for the ApplyResourceChange RPC.
func (*Server) UpgradeResourceState ¶ added in v0.9.0
func (s *Server) UpgradeResourceState(ctx context.Context, req *UpgradeResourceStateRequest, resp *UpgradeResourceStateResponse)
UpgradeResourceState implements the framework server UpgradeResourceState RPC.
func (*Server) ValidateDataSourceConfig ¶ added in v0.9.0
func (s *Server) ValidateDataSourceConfig(ctx context.Context, req *ValidateDataSourceConfigRequest, resp *ValidateDataSourceConfigResponse)
ValidateDataSourceConfig implements the framework server ValidateDataSourceConfig RPC.
func (*Server) ValidateProviderConfig ¶ added in v0.9.0
func (s *Server) ValidateProviderConfig(ctx context.Context, req *ValidateProviderConfigRequest, resp *ValidateProviderConfigResponse)
ValidateProviderConfig implements the framework server ValidateProviderConfig RPC.
func (*Server) ValidateResourceConfig ¶ added in v0.9.0
func (s *Server) ValidateResourceConfig(ctx context.Context, req *ValidateResourceConfigRequest, resp *ValidateResourceConfigResponse)
ValidateResourceConfig implements the framework server ValidateResourceConfig RPC.
type ServerCapabilities ¶ added in v0.10.0
type ServerCapabilities struct { // GetProviderSchemaOptional signals that the provider does not require the // GetProviderSchema RPC before other RPCs. // // This should always be enabled in framework providers and requires // Terraform 1.6 or later. GetProviderSchemaOptional bool // MoveResourceState signals that the provider is ready for the // MoveResourceState RPC. // // This should always be enabled in framework providers and requires // Terraform 1.8 or later. MoveResourceState bool // PlanDestroy signals that the provider is ready for the // PlanResourceChange RPC on resource destruction. // // This should always be enabled in framework providers and requires // Terraform 1.3 or later. PlanDestroy bool }
ServerCapabilities is a combination of tfprotov5.ServerCapabilities and tfprotov6.ServerCapabilties, which may diverge over time. If that happens, the toproto5 conversion logic will handle the appropriate filtering and the proto5server/fwserver logic will need to account for missing features.
type UpdateResourceRequest ¶ added in v0.9.0
type UpdateResourceRequest struct { Config *tfsdk.Config PlannedPrivate *privatestate.Data PlannedState *tfsdk.Plan PriorState *tfsdk.State ProviderMeta *tfsdk.Config ResourceSchema fwschema.Schema Resource resource.Resource }
UpdateResourceRequest is the framework server request for an update request with the ApplyResourceChange RPC.
type UpdateResourceResponse ¶ added in v0.9.0
type UpdateResourceResponse struct { Diagnostics diag.Diagnostics NewState *tfsdk.State Private *privatestate.Data }
UpdateResourceResponse is the framework server response for an update request with the ApplyResourceChange RPC.
type UpgradeResourceStateRequest ¶ added in v0.9.0
type UpgradeResourceStateRequest struct { // Using the tfprotov6 type here was a pragmatic effort decision around when // the framework introduced compatibility promises. This type was chosen as // it was readily available and trivial to convert between tfprotov5. // // Using a terraform-plugin-go type is not ideal for the framework as almost // all terraform-plugin-go types have framework abstractions, but if there // is ever a time where it makes sense to re-evaluate this decision, such as // a major version bump, it could be changed then. // Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/340 RawState *tfprotov6.RawState ResourceSchema fwschema.Schema Resource resource.Resource Version int64 }
UpgradeResourceStateRequest is the framework server request for the UpgradeResourceState RPC.
type UpgradeResourceStateResponse ¶ added in v0.9.0
type UpgradeResourceStateResponse struct { Diagnostics diag.Diagnostics UpgradedState *tfsdk.State }
UpgradeResourceStateResponse is the framework server response for the UpgradeResourceState RPC.
type ValidateAttributeRequest ¶ added in v1.0.0
type ValidateAttributeRequest struct { // AttributePath contains the path of the attribute. Use this path for any // response diagnostics. AttributePath path.Path // AttributePathExpression contains the expression matching the exact path // of the attribute. AttributePathExpression path.Expression // AttributeConfig contains the value of the attribute in the configuration. AttributeConfig attr.Value // Config contains the entire configuration of the data source, provider, or resource. Config tfsdk.Config }
ValidateAttributeRequest repesents a request for attribute validation.
type ValidateAttributeResponse ¶ added in v1.0.0
type ValidateAttributeResponse struct { // Diagnostics report errors or warnings related to validating the data // source configuration. An empty slice indicates success, with no warnings // or errors generated. Diagnostics diag.Diagnostics }
ValidateAttributeResponse represents a response to a ValidateAttributeRequest. An instance of this response struct is automatically passed through to each AttributeValidator.
type ValidateDataSourceConfigRequest ¶ added in v0.9.0
type ValidateDataSourceConfigRequest struct { Config *tfsdk.Config DataSource datasource.DataSource }
ValidateDataSourceConfigRequest is the framework server request for the ValidateDataSourceConfig RPC.
type ValidateDataSourceConfigResponse ¶ added in v0.9.0
type ValidateDataSourceConfigResponse struct {
Diagnostics diag.Diagnostics
}
ValidateDataSourceConfigResponse is the framework server response for the ValidateDataSourceConfig RPC.
type ValidateProviderConfigRequest ¶ added in v0.9.0
ValidateProviderConfigRequest is the framework server request for the ValidateProviderConfig RPC.
type ValidateProviderConfigResponse ¶ added in v0.9.0
type ValidateProviderConfigResponse struct { PreparedConfig *tfsdk.Config Diagnostics diag.Diagnostics }
ValidateProviderConfigResponse is the framework server response for the ValidateProviderConfig RPC.
type ValidateResourceConfigRequest ¶ added in v0.9.0
ValidateResourceConfigRequest is the framework server request for the ValidateResourceConfig RPC.
type ValidateResourceConfigResponse ¶ added in v0.9.0
type ValidateResourceConfigResponse struct {
Diagnostics diag.Diagnostics
}
ValidateResourceConfigResponse is the framework server response for the ValidateResourceConfig RPC.
type ValidateSchemaRequest ¶ added in v0.9.0
type ValidateSchemaRequest struct { // Config contains the entire configuration of the data source, provider, or resource. // // This configuration may contain unknown values if a user uses // interpolation or other functionality that would prevent Terraform // from knowing the value at request time. Config tfsdk.Config }
ValidateSchemaRequest repesents a request for validating a Schema.
type ValidateSchemaResponse ¶ added in v0.9.0
type ValidateSchemaResponse struct { // Diagnostics report errors or warnings related to validating the schema. // An empty slice indicates success, with no warnings or errors generated. Diagnostics diag.Diagnostics }
ValidateSchemaResponse represents a response to a ValidateSchemaRequest.
Source Files ¶
- attr_type.go
- attr_value.go
- attribute_plan_modification.go
- attribute_validation.go
- block_plan_modification.go
- block_validation.go
- diagnostics.go
- doc.go
- schema_plan_modification.go
- schema_semantic_equality.go
- schema_validation.go
- server.go
- server_applyresourcechange.go
- server_callfunction.go
- server_capabilities.go
- server_configureprovider.go
- server_createresource.go
- server_deleteresource.go
- server_functions.go
- server_getfunctions.go
- server_getmetadata.go
- server_getproviderschema.go
- server_importresourcestate.go
- server_moveresourcestate.go
- server_planresourcechange.go
- server_readdatasource.go
- server_readresource.go
- server_updateresource.go
- server_upgraderesourcestate.go
- server_validatedatasourceconfig.go
- server_validateproviderconfig.go
- server_validateresourceconfig.go