Skip to main content
In this article, we recap Terraform providers and illustrate how to use them to provision resources across various platforms. Terraform follows a plugin-based architecture that supports hundreds of platforms, including AWS, GCP, Azure, and more. The first command you’ll run with a valid configuration is the Terraform init command. This command installs the necessary plugins for the providers specified in your configuration.
Running terraform init is safe and can be executed multiple times without affecting your deployed infrastructure.
Terraform providers, distributed by HashiCorp, are publicly available in the Terraform Registry. There are three types of providers:
  1. Official Providers: Owned and maintained by HashiCorp. These include major cloud providers like AWS, GCP, and Azure. Official providers feature a distinct badge in the Terraform Registry.
  2. Partner Providers: Maintained by third-party technology companies but reviewed and tested by HashiCorp. They are identified by a checkmark badge in the registry.
  3. Community Providers: Published and maintained by individual contributors.
The image shows logos of cloud service providers and partners categorized as "Official," "Partner," and "Community" on the Terraform registry website.

Understanding Terraform Init Output

When running terraform init, you may see output similar to the following:
In this output, you can observe that the plugin for the HashiCorp Local provider (version 2.0.0) has been installed in your working directory. The plugins are downloaded into a hidden folder named .terraform/plugins located in the directory containing your configuration files.
For production environments, always add version constraints in your configuration to avoid unexpected breaking changes from automatic upgrades.

Provider Naming Convention

Terraform provider names include an organizational namespace. For example, in the case of the local provider, the namespace is “hashicorp”, and the provider type is “local”. Other common examples include AWS, Azure, and Google Cloud.
The provider name can optionally include a hostname. The hostname indicates the registry location for the plugin. By default, if the hostname is omitted, it defaults to registry.terraform.io. Therefore, the source address for the local provider can be specified as either:
  • registry.terraform.io/hashicorp/local
  • or simply hashicorp/local
The image provides instructions for adding version constraints in Terraform configurations to prevent automatic upgrades. It includes a URL with labeled components.

Watch Video