» Terraform Plugin Types
Terraform is logically split into two main parts: Terraform Core and Terraform Plugins. Each plugin exposes an implementation for a specific service, such as the AWS provider or the cloud-init provider. Terraform Plugins are written in Go and are executable binaries executed as a separate process and communicate with the main Terraform binary over an RPC interface. The network communication and RPC is handled automatically by higher-level Terraform libraries, so developers need only worry about the implementation of their specific Plugin behavior.
The Terraform Plugin SDK currently supports one type of plugin: providers.
Providers are the most common type of Plugin, which expose the features that a
specific service offers via its application programming
(API). Providers define Resources and are responsible for managing their
life cycles. Examples of providers are the Amazon Web Service
Provider or the Google Cloud
Provider. Example resources are
Terraform Providers contain all the code needed to authenticate and connect to a
service on behalf of the user. Each Resource implements
DELETE (CRUD) methods to manage itself, while Terraform Core
manages a Resource Graph of all the resources
declared in the configuration as well as their current state. Resources remain
ignorant of the current state, only responding to method calls from Terraform
Core and performing the matching CRUD action.
Terraform determines the Providers needed by reading and interpolating
configuration files. Terraform will dynamically discover and fetch the needed
providers from releases.hashicorp.com, or from
specific locations on disk.
At time of writing, the source code for all Providers distributed by HashiCorp
for automatic discovery are hosted on in the
Visit the Provider index in our documentation section to learn more about our existing Providers.