Terraform Plugin Framework
terraform-plugin-framework is a module for building Terraform providers. It is built on terraform-plugin-go. It aims to provide as much of the power, predictability, and versatility of terraform-plugin-go as it can while abstracting away implementation details and repetitive, verbose tasks.
terraform-plugin-framework is still in technical preview. We are committed to moving forward with the module, but cannot guarantee any of its interfaces will not change as long as it is in version 0. We're waiting for more feedback, usage, and maturity before we're comfortable committing to APIs with the same years-long support timelines that terraform-plugin-sdk brings. We do not expect practitioner experiences to break or change as a result of these changes, only the abstractions surfaced to provider developers.
terraform-plugin-framework is also not at full feature parity with terraform-plugin-sdk yet. Notably, it doesn't offer support for using timeouts. We plan to add these features soon. See Which SDK Should I Use? on terraform.io for more information.
We believe terraform-plugin-framework is still a suitable and reliable module to build Terraform providers on, and encourage community members that can afford occasional breaking changes to build with it. terraform-plugin-framework will eventually become a new major version of terraform-plugin-sdk, at which point its interfaces will be stable, but we need real-world use and feedback before we can be comfortable making those commitments. When that happens, this repository will be archived.
We recommend only using tagged releases of this module, and examining the CHANGELOG when upgrading to a new release. Breaking changes will only be made in minor versions; patch releases will always maintain backwards compatibility.
We welcome and appreciate issues and PRs discussing both the design and implementation of this module.
Terraform CLI Compatibility
Plugins built with this framework are only compatible with Terraform versions above v1.0.3.
Prior to its 1.0 release, this module will only support the latest released version of Go, and may use features and functionality introduced in that version of Go.
Currently that means Go 1.17 must be used when building a provider with this framework.
Documentation for terraform-plugin-framework is still in development. In the meantime, the GoDoc is the best source of documentation.
tfsdk.Provider type is the root of your provider implementation. From there,
tfsdk.DataSourceType implementations define the schema of your resources and data sources, and how to create
tfsdk.DataSource implementations that talk to the API.
Package fromproto6 contains functions to convert from protocol version 6 (tfprotov6) types to framework types.
|Package fromproto6 contains functions to convert from protocol version 6 (tfprotov6) types to framework types.|
Package fwserver contains the framework provider server implementation.
|Package fwserver contains the framework provider server implementation.|
Package proto6server contains the provider server implementation compatible with protocol version 6 (tfprotov6.ProviderServer).
|Package proto6server contains the provider server implementation compatible with protocol version 6 (tfprotov6.ProviderServer).|
types contains shared attr.Type implementations for unit testing.
|types contains shared attr.Type implementations for unit testing.|
Package toproto6 contains functions to convert from framework types to protocol version 6 (tfprotov6) types.
|Package toproto6 contains functions to convert from framework types to protocol version 6 (tfprotov6) types.|