The Terraform plugin protocol is a versioned interface between Terraform CLI and Terraform Plugins.
During discovery, the Terraform Registry uses the protocol version as additional compatibility metadata when deciding which plugin versions Terraform CLI can select. You can configure this metadata in the Terraform Registry manifest file when you create a plugin release.
Major versions of the protocol delineate Terraform CLI and Terraform Plugin compatibility. Minor versions of the protocol are additive. The protocol is implemented in Protocol Buffers and gRPC, with the canonical source for protocol definitions located in the Terraform CLI repository.
Protocol version 6 is compatible with Terraform CLI version 1.0 and later. Protocol version 6 includes all version 5 functionality for providers, plus:
SchemaAttribute
with the NestedType
field.
Computed
only) attribute.Implementations include:
Protocol version 5 is compatible with Terraform CLI version 0.12 and later.
Implementations include:
The Terraform plugin protocol specifies the following RPCs:
Protocol Version 5 Protocol Version 6 DescriptionGetSchema
GetProviderSchema
Returns provider schema, provider metaschema, all resource schemas and all data source schemas. GetMetadata
GetMetadata
Returns data source, managed resource, and function metadata, such as names. GetFunctions
GetFunctions
Returns function definitions. CallFunction
CallFunction
Called when a practitioner configuration contains a provider-defined function. PrepareProviderConfig
ValidateProviderConfig
Validates the practitioner supplied provider configuration by verifying types conform to the schema and supports value validation diagnostics. ValidateResourceTypeConfig
ValidateResourceConfig
Validates the practitioner supplied resource configuration by verifying types conform to the schema and supports value validation diagnostics. ValidateDataSourceConfig
ValidateDataResourceConfig
Validates the practitioner supplied data source configuration by verifying types conform to the schema and supports value validation diagnostics. UpgradeResourceState
UpgradeResourceState
Called when a resource has existing state. Primarily useful for when the schema version does not match the current version. The provider is expected to modify the state to upgrade it to the latest schema. Configure
ConfigureProvider
Passes the practitioner supplied provider configuration to the provider. ReadResource
ReadResource
Called when refreshing a resource's state. ReadDataSource
ReadDataSource
Called when refreshing a data source's state. PlanResourceChange
PlanResourceChange
Calculates a plan for a resource. A proposed new state is generated, which the provider can modify. ApplyResourceChange
ApplyResourceChange
Called when a practitioner has approved a planned change. The provider is to apply the changes contained in the plan, and return a resulting state matching the given plan. ImportResourceState
ImportResourceState
Called when importing a resource into state so that the resource becomes managed.
The following illustrate the RPCs that are sent during execution of the specified Terraform commands.
The RPCs issued are for a provider that is using version 6 of the Terraform plugin protocol when the Terraform configuration contains configuration for the provider, a resource and a data source.
terraform validateExecuting terraform validate results in the following unique RPCs:
The general sequence of RPCs is as follows:
Executing terraform plan results in the following unique RPCs:
The general sequence of RPCs is as follows:
Executing terraform apply (with default -refresh=true and -auto-approve) results in the following unique RPCs:
The general sequence of RPCs is as follows:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4