Quick answer: The Terraform Registry at registry.terraform.io is HashiCorp’s public catalogue of providers and modules. To use a provider from it, search for the platform you need, check its tier badge (Official, Partner or Community), copy the required_providers snippet from its “Use provider” button into your configuration, pin the version, and run terraform init β Terraform downloads the plugin and records it in the lock file. The same site hosts each provider’s full documentation for every resource and data source.
This guide shows you how to search the Registry efficiently, judge whether a provider is trustworthy, read its documentation the way experienced engineers do, install and pin it correctly, and use modules from the same catalogue. It also covers private registries for enterprises and what to do when no provider exists for your tool.
What the Terraform Registry contains
The Registry is two catalogues in one website:
- Providers β the plugins that let Terraform talk to a platform:
hashicorp/aws,hashicorp/azurerm,hashicorp/google,hashicorp/kubernetes, plus thousands of partner and community providers for SaaS tools, DNS hosts, monitoring systems and internal APIs. Each provider page contains its documentation, versions and the exact code to install it. - Modules β reusable bundles of Terraform code published by HashiCorp, cloud vendors and the community, such as
terraform-aws-modules/vpc/aws, which creates a complete VPC with a few variables.
Terraform uses the Registry by default whenever a source is a registry address, so you rarely need to configure anything to start using it. For how providers fit into the wider picture, see Terraform Core Concepts and Syntax: A Beginner’s Guide.
Searching for providers efficiently
The search box accepts the platform name (“cloudflare”, “datadog”, “mongodb”) and returns providers and modules together; click the Providers tab to narrow it. Then use the filters on the left β tier, category (cloud, database, networking, monitoring, security) β to cut the list down. When several providers exist for the same service, read the tier badge and download count before anything else:
| Tier | Published by | What it tells you | Examples |
|---|---|---|---|
| Official | HashiCorp | Maintained by HashiCorp, fully supported, frequent releases | aws, azurerm, google, kubernetes, random, null |
| Partner | The vendor, verified by HashiCorp | Maintained by the company that owns the API; safe default for SaaS tools | cloudflare, datadog, mongodbatlas, pagerduty |
| Community | Individuals or open-source groups | Quality varies; check activity, issues and release dates | Niche tools and internal API wrappers |
| Archived | Any | No longer maintained; avoid for new work | Providers superseded by newer ones |
For a Community provider, open the linked GitHub repository and check the date of the last release, the ratio of open to closed issues, and whether maintainers respond to pull requests. A provider with no release in two years will break the day the vendor changes its API.
Reading a provider page like an expert
Every provider page has the same layout, and learning it saves hours:
- Overview tab β the provider’s own configuration arguments (region, project, authentication) and example setup.
- Documentation sidebar β resources and data sources grouped by service; use the filter box, because the AWS provider alone has over 1,400 resources.
- Argument Reference β which arguments are required, which are optional and their defaults. Read this before copying examples.
- Attribute Reference β the values a resource exports after creation (IDs, ARNs, DNS names) for use in other resources or outputs.
- Version dropdown β switch documentation to the exact version you have pinned; defaults change between majors.
Installing and pinning a provider
Click Use provider at the top right of the provider page. It shows a ready-made snippet; copy it into your configuration and keep the version constraint rather than deleting it:
terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 4.40"
}
aws = {
source = "hashicorp/aws"
version = "~> 5.60"
}
}
}
provider "cloudflare" {
# Reads CLOUDFLARE_API_TOKEN from the environment
}
provider "aws" {
region = "ap-south-1"
}
Then initialise and inspect what was installed:
terraform init
# Initializing provider plugins...
# - Finding cloudflare/cloudflare versions matching "~> 4.40"...
# - Installing cloudflare/cloudflare v4.45.0...
# - Finding hashicorp/aws versions matching "~> 5.60"...
# - Installing hashicorp/aws v5.67.0...
terraform providers # tree of providers and constraints
cat .terraform.lock.hcl # exact versions and checksums β commit this file
The source address has three parts: hostname (omitted for the public registry), namespace and type. hashicorp/aws expands to registry.terraform.io/hashicorp/aws. Partner and community providers use their own namespace, which is why the snippet from the Registry page is the safest thing to copy β it includes the correct namespace. Once the provider is installed, the resource and data source pages on the same site are what you will consult while creating and managing infrastructure resources in Terraform.
Using modules from the Registry
Modules install the same way: open the module page, copy the Provision Instructions snippet and fill in the variables. A VPC in Mumbai with public and private subnets takes a dozen lines:
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "~> 5.13"
name = "tkh-prod"
cidr = "10.20.0.0/16"
azs = ["ap-south-1a", "ap-south-1b"]
public_subnets = ["10.20.1.0/24", "10.20.2.0/24"]
private_subnets = ["10.20.11.0/24", "10.20.12.0/24"]
enable_nat_gateway = true
single_nat_gateway = true
}
output "private_subnet_ids" {
value = module.vpc.private_subnets
}
Always pin a module version and skim its source on GitHub before using it in production β a Registry module is other people’s code running with your credentials. Prefer modules marked Verified.
Private registries and mirrors
Enterprises often cannot download from the public internet, or want to publish internal modules privately. Three options cover these cases:
- HCP Terraform / Terraform Enterprise private registry β publish modules and providers behind SSO; sources look like
app.terraform.io/my-org/vpc/aws. - Provider network mirror β run
terraform providers mirror ./mirroronce, host the directory internally and point the CLI at it with aprovider_installationblock in~/.terraformrc, so air-gapped runners can stillinit. - Artifact repositories β JFrog Artifactory, Nexus and GitLab implement the registry protocol and can proxy and cache public providers.
If no provider exists for a tool you need, you can use the http data source for read-only lookups, a generic REST provider for simple APIs, or write your own in Go with the Terraform Plugin Framework and publish it to the Registry from a public GitHub repository named terraform-provider-<name>.
Six Registry mistakes to avoid
- Copying resource examples without reading the Argument Reference. Examples show the happy path; required arguments and defaults live in the reference.
- Picking the first search result. Check the tier badge, namespace and release date; several look-alike community providers exist for popular tools.
- Deleting the version constraint from the “Use provider” snippet. Unpinned providers break reproducibility.
- Reading documentation for the wrong version. Use the version dropdown to match your lock file.
- Using an unverified module in production without reading its code. Pin it and review the source.
- Writing a custom provider when a partner provider already exists. Search the Registry thoroughly first.
Frequently asked questions
Is the Terraform Registry free to use?
Yes. The public registry is free for downloading and publishing providers and modules. Private registries are part of HCP Terraform (which has a free tier for small teams) and Terraform Enterprise.
Does OpenTofu use the same Registry?
OpenTofu has its own registry at registry.opentofu.org, which mirrors most public providers and modules. Source addresses without a hostname resolve to each tool’s default registry, so the same hashicorp/aws works in both.
How do I know which provider version introduced a resource?
Open the provider’s CHANGELOG on GitHub (linked from the Registry page) and search for the resource name. The entry lists the version where it was added.
Key takeaways
- The Registry is the default source for providers and modules;
terraform initdownloads from it automatically. - Judge providers by tier, namespace, download count and recent activity before adopting them.
- Copy the
required_providerssnippet, keep the version constraint and commit the lock file. - Read the Argument and Attribute Reference for your pinned version, not just the examples.
- Use private registries or mirrors for internal modules and air-gapped environments.
Ready to go beyond the Registry and build real infrastructure with Terraform? Our DevOps course covers Terraform providers, modules and cloud deployment with live projects, mentor support and placement assistance. For practical video tutorials, subscribe to our YouTube channel.


