» Extending Terraform

Terraform can be extended to allow users to manage more infrastructure providers with Providers (containing Resources and/or Data Sources), more options to store Terraform state with Backends. Providers are a type of Terraform "Plugin".

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.

» How Terraform Works

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.

» Plugin Types

Learn about Terraform plugins that you can develop using the Terraform Plugin SDK (currently only Providers).

» Writing Custom Providers

A step by step guide for writing, compiling, and executing an example Terraform Provider.

» HashiCorp Provider Design Principles

Emergent practices learned by official Terraform Provider developers that can guide design and decision making for all providers.

» Schemas

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.

» Resources

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.

» Best Practices

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.

» Testing

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.

» Community

Terraform is a mature project with a growing community. There are active, dedicated people willing to help you through various mediums.