Edit this page on GitHub
Terraform Plugin SDKv2
Learn about version 2 of the Terraform Plugin SDK.
Terraform Plugin SDKv2 is an established way to develop Terraform Plugins on protocol version 5.
- Try the Call APIs with Custom Providers tutorials on HashiCorp Learn.
- Clone the terraform-provider-scaffolding template repository on GitHub.
- Schemas define available fields for provider, resource, or provisioner configuration block, and give Terraform metadata about those fields.
- Resources are an abstraction that allow Terraform to manage infrastructure objects, such as a compute instance, an access policy, or disk. Providers act as a translation layer between Terraform and an API, offering one or more resources for practitioners to define in a configuration.
»Debug and Test
- Learn how to debug your provider using either logging calls or a debugging tool.
- Learn how to write successful acceptance and unit tests for your provider.
»Combine or Translate
- Combine your provider with other protocol version 5 providers.
- Translate your provider into a protocol version 6 provider to require Terraform 1.0 and later.
»Migrate to Terraform Plugin Framework
The terraform-plugin-framework is a new way to develop Terraform providers, offering improvements and new features from Terraform Plugin SDKv2. You can refactor individual resources and data sources over time with the following compatibility: