terraform-plugin-framework

module
Version: v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 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

Providers built with this framework are compatible with Terraform version v0.12 and above.

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.18 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 provider.Provider type is the root of your provider implementation. From there, provider.ResourceType and provider.DataSourceType implementations define the schema of your resources and data sources, and how to create resource.Resource and datasource.DataSource implementations that talk to the API.

Contributing

See .github/CONTRIBUTING.md

License

Mozilla Public License v2.0

Directories

Path Synopsis
Package attr contains type and value interfaces for core framework and provider-defined data types.
Package attr contains type and value interfaces for core framework and provider-defined data types.
xattr
Package xattr contains additional interfaces for attr types.
Package xattr contains additional interfaces for attr types.
Package datasource contains all interfaces, request types, and response types for a data source implementation.
Package datasource contains all interfaces, request types, and response types for a data source implementation.
Package diag implements diagnostic functionality, which is a practitioner feedback mechanism for providers.
Package diag implements diagnostic functionality, which is a practitioner feedback mechanism for providers.
Package path implements attribute path functionality, which defines transversals into schema-based data.
Package path implements attribute path functionality, which defines transversals into schema-based data.
Package provider contains all interfaces, request types, and response types for a provider implementation.
Package provider contains all interfaces, request types, and response types for a provider implementation.
Package providerserver implements functionality for serving a provider, such as directly starting a server in a production binary and conversion functions for testing.
Package providerserver implements functionality for serving a provider, such as directly starting a server in a production binary and conversion functions for testing.
Package resource contains all interfaces, request types, and response types for a managed resource implementation.
Package resource contains all interfaces, request types, and response types for a managed resource implementation.
Package tfsdk contains core framework functionality for schemas and schema data.
Package tfsdk contains core framework functionality for schemas and schema data.
Package types contains the framework-defined data types and values, such as boolean, floating point, integer, list, map, object, set, and string.
Package types contains the framework-defined data types and values, such as boolean, floating point, integer, list, map, object, set, and string.
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.
fromtftypes
Package fromtftypes contains functions to convert from terraform-plugin-go tftypes types to framework types.
Package fromtftypes contains functions to convert from terraform-plugin-go tftypes types to framework types.
fwschema
Package fwschema implements shared logic for describing the structure, data types, and behaviors of framework data for data sources, providers, and resources.
Package fwschema implements shared logic for describing the structure, data types, and behaviors of framework data for data sources, providers, and resources.
fwschema/fwxschema
Package fwxschema implements extra framework-based schema functionality on top of base Terraform attribute functionality.
Package fwxschema implements extra framework-based schema functionality on top of base Terraform attribute functionality.
fwschemadata
Package fwschemadata implements the shared schema-based data implementation for configuration, plan, and state values.
Package fwschemadata implements the shared schema-based data implementation for configuration, plan, and state values.
fwserver
Package fwserver contains the framework provider server implementation.
Package fwserver contains the framework provider server implementation.
logging
Package logging contains framework internal helpers for consistent logger and log entry handling.
Package logging contains framework internal helpers for consistent logger and log entry handling.
privatestate
Package privatestate contains the type used for handling private resource state data.
Package privatestate contains the type used for handling private resource state data.
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).
reflect
Package reflect contains the implementation for converting framework-defined data into and from provider-defined Go types.
Package reflect contains the implementation for converting framework-defined data into and from provider-defined Go types.
testing
Package testing contains internal framework helpers for unit testing.
Package testing contains internal framework helpers for unit testing.
testing/planmodifiers
Package planmodifiers contains plan modifiers for testing.
Package planmodifiers contains plan modifiers for testing.
testing/testprovider
Package testprovider contains a fully declarative provider for testing.
Package testprovider contains a fully declarative provider for testing.
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.
totftypes
Package totftypes contains functions to convert from framework types to terraform-plugin-go tftypes types.
Package totftypes contains functions to convert from framework types to terraform-plugin-go tftypes types.

Jump to

Keyboard shortcuts

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