» Extending Terraform
This is an advanced section! If you are looking for information on using Terraform with any of the existing Plugins, please refer to the Docs section of this website.
The Extending Terraform section contains content for users who wish to extend Terraform. The intended audience is anyone wanting to add or edit source code (“developers”) for either Terraform itself or a Terraform Plugin. The content assumes you have basic operating knowledge or experience using Terraform.
Below is a brief description of each section. The content is organized from simplest to most complex — developers new to writing code for Terraform should start at the top.
High level overview of how the Terraform tool works. Learn about the logical components of Terraform (Core vs. Plugins) and the basics of how they interact.
Learn about Terraform plugins that you can develop using the Terraform Plugin SDK (currently only Providers).
A collection of step by step tutorials for writing, compiling, and executing an example Terraform Provider.
Emergent practices learned by official Terraform Provider developers that can guide design and decision making for all providers.
The Schema package is a high-level framework for easily writing Plugins for Terraform. Providers (with Resources and/or Data Sources) are defined in terms of the Schema package, which includes builtin types and methods for developers to use when writing plugins.
The Resource package provides several utilities and conveniences for handling tasks such as state migrations and customized difference behavior, these tasks often come up during provider development as schemas must change and evolve over time.
The Best Practices section offers guides on techniques that range from the steps required to deprecate schema attributes, to testing patterns, and how to version and manage a provider changelog. These techniques were learned through years of Terraform development from both HashiCorp employees and Community members.
Terraform provides a testing framework for validating resource implementations. The Testing section provides a breakdown of how to compose these tests using Test Cases and Test Steps, as well as covering unit test conventions and how they apply to Terraform plugin development.
Terraform is a mature project with a growing community. There are active, dedicated people willing to help you through various mediums.