Announcing the Terraform Plugin SDK
We’re pleased to announce the release of the Terraform Plugin SDK, a standalone Go module for developing Terraform providers.
» Terraform is its Providers
Terraform providers are the crucial component that allow Terraform to represent almost any infrastructure type or service API as a resource in a simple, declarative configuration language. They are central to the day-to-day experience of using Terraform.
With the release of Terraform 0.10, Terraform providers were split from the Terraform Core codebase, and are since versioned separately. This change unlocked the potential for a thriving ecosystem of Terraform providers: the core providers maintained by HashiCorp, and the large number of high-quality third-party providers developed by our partners and the open-source community.
We want to maintain the excellent practitioner experience that Terraform is known for, while making provider development easier and safer.
» The Terraform Plugin SDK v1.0.0: Democratizing Terraform Provider Development
Until now, the Plugin SDK was part of the Terraform Core codebase. Developers writing Terraform providers needed to import Terraform Core (https://github.com/hashicorp/terraform) as a library, and make use of an implicit SDK living mainly in the helper/
directory. Splitting the Plugin SDK out of the Core codebase, like the providers in 0.10, allows us to give it more meaningful versions, and iterate more quickly on features and bug fixes.
While the critical types and interfaces for developing providers are well documented in the code, there is a high barrier to entry in determining which parts of Core pertain to the Terraform CLI, and which are available for developing providers. Additionally, importing Terraform Core pulls in a large number of Go dependencies that are unnecessary for developing Terraform providers.
The Terraform Plugin SDK extracts this implicit SDK from Terraform Core into a standalone Go module. Terraform providers no longer need to import Terraform Core, and should import the Terraform Plugin SDK instead, whose API surface is explicitly available for Terraform provider functionality. We hope this change lowers the barrier to entry for creating Terraform providers.
Terraform Plugin SDK v1.0.0 is designed for maximum compatibility with existing providers importing Terraform Core v0.12. The SDK is versioned separately from Core. Improvements to the SDK will start from this baseline, following a Semantic Versioning scheme compatible with Go modules. The informal SDK within the Core repository is now deprecated, and will be removed in a future version.
The interface between the Terraform Plugin SDK and Terraform Core is a gRPC wire protocol described in a single protobuf file. For more technical details, please see the plugin-protocol documentation. Currently, providers are the only type of plugin supported by the Plugin SDK.
» Getting Started with the Terraform Plugin SDK
If you are a Terraform provider developer, we recommend that you switch from Terraform Core to the Terraform Plugin SDK. The Terraform team has created a migrator CLI tool to make this a simple process.
For a step-by-step guide, please see our documentation: https://www.terraform.io/docs/extend/plugin-sdk.html
Sign up for the latest HashiCorp news
More blog posts like this one
New Terraform integrations with Crowdstrike, Datadog, JFrog, Red Hat, and more
12 new Terraform integrations from 9 partners provide more options to automate and secure cloud infrastructure management.
Terraform delivers launch-day support for Amazon S3 Tables, EKS Hybrid Nodes, and more at re:Invent
The Terraform provider for AWS now enables users to manage a variety of new services just announced at re:Invent.
HashiCorp at re:Invent 2024: Infrastructure Lifecycle Management with AWS
A recap of HashiCorp infrastructure news and developments on AWS from the past year, from a new provider launch to simplifying infrastructure provisioning and more.