Terraform
Terraform plugin protocol
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.
For more detail about how the protocol RPCs are used, refer to the following topics:
Protocol Version 6
Protocol version 6 is compatible with Terraform CLI version 1.0 and later. Protocol version 6 includes all version 5 functionality for providers, plus:
- Nested Attributes: Define
SchemaAttribute
with theNestedType
field.- Enable practitioners to use easier argument syntax instead of block syntax.
- Configure value sensitivity on individual nested attributes, rather than an entire read-only (
Computed
only) attribute.
Implementations include:
- terraform-plugin-framework: A higher-level SDK that makes Terraform provider development easier by abstracting implementation details.
- terraform-plugin-go tf6server: A lower-level SDK to develop Terraform providers for more advanced use cases.
- tf5to6server: A package to translate protocol version 5 providers into protocol version 6.
- tf6muxserver: A package to combine multiple protocol version 6 providers.
Refer to Terraform Plugin RPC protocol version 6.10 in the Terraform repository for the protocol v6 definition.
Protocol Version 5
Protocol version 5 is compatible with Terraform CLI version 0.12 and later.
Implementations include:
- terraform-plugin-framework: A higher-level SDK that makes Terraform provider development easier by abstracting implementation details.
- terraform-plugin-sdk/v2: A higher-level SDK that makes Terraform provider development easier by abstracting implementation details.
- terraform-plugin-go tf5server: A lower-level SDK to develop Terraform providers for more advanced use cases.
- tf6to5server: A package to translate protocol version 6 providers into protocol version 5.
- tf5muxserver: A package to combine multiple protocol version 5 providers.
Refer to Terraform Plugin RPC protocol version 5.10 in the Terraform repository for the protocol v5 definition.