terraform-plugin-framework

module
Version: v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2022 License: MPL-2.0

README

PkgGoDev

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.

Status

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.

Go Compatibility

This project follows the support policy of Go as its support policy. The two latest major releases of Go are supported by the project.

Currently, that means Go 1.17 or later must be used when including this project as a dependency.

Getting Started

Documentation for terraform-plugin-framework is still in development. In the meantime, the GoDoc is the best source of documentation.

The tfsdk.Provider type is the root of your provider implementation. From there, tfsdk.ResourceType and tfsdk.DataSourceType implementations define the schema of your resources and data sources, and how to create tfsdk.Resource and tfsdk.DataSource implementations that talk to the API.

Contributing

See .github/CONTRIBUTING.md

License

Mozilla Public License v2.0

Directories

Path Synopsis
internal
fromproto5
Package fromproto5 contains functions to convert from protocol version 5 (tfprotov5) types to framework types.
Package fromproto5 contains functions to convert from protocol version 5 (tfprotov5) types to framework types.
fromproto6
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.
fwserver
Package fwserver contains the framework provider server implementation.
Package fwserver contains the framework provider server implementation.
proto5server
Package proto5server contains the provider server implementation compatible with protocol version 5 (tfprotov5.ProviderServer).
Package proto5server contains the provider server implementation compatible with protocol version 5 (tfprotov5.ProviderServer).
proto6server
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).
testing/types
types contains shared attr.Type implementations for unit testing.
types contains shared attr.Type implementations for unit testing.
toproto5
Package toproto5 contains functions to convert from framework types to protocol version 5 (tfprotov5) types.
Package toproto5 contains functions to convert from framework types to protocol version 5 (tfprotov5) types.
toproto6
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL