Providers and modules are the building blocks of Terraform configuration, and the Terraform ecosystem has a robust library of each for you to use. As you develop your infrastructure, you may rely on more modules and providers to provision your resources, and a growing library of components can make it hard to find the modules and providers you need. HCP Terraform's private registry allows you to curate the modules and providers your organization uses, which make approved modules and providers easier to find.
Curating public modules and providers in your private registry lets you define a list of approved components for your organization to use. It also lets your team find all documentation related to those components in one place, and makes it easier to track new releases and changes.
In this tutorial, you will add a public Terraform module and provider to your organization's private registry. You will review the details for these components in the private registry and how to remove the provider and module from your registry. In the process, you will learn how to use the registry to curate your organization's resources and adopt a consistent development workflow.
For this tutorial, you will need an HCP Terraform account and organization owner access.
In your HCP Terraform dashboard, click on Registry in the top menu bar, then click on Search public registry.
In the search bar, type aws
, then select the aws
provider.
On the provider details page, you will find:
aws
) and description.aws
provider.To add the provider to your private registry, click on Add to HCP Terraform.
Confirm by clicking Add to organization.
You have now added the provider to your private registry.
You can use a similar workflow to curate modules in your private registry.
Navigate back to your HCP Terraform Registry, then click on Search public registry.
Enter vpc
into the search bar, then click on the Modules tab.
Select terraform-aws-modules/vpc
.
On the module page, you will find:
vpc
) and description.Once you have reviewed this module, click the Add to HCP Terraform button to add this vpc
module to your organization's private registry.
Confirm by clicking Add to organization.
Tip
HCP Terraform Plus Edition lets you publish modules that users deploy without referencing them in Terraform configuration. Follow the Create and Use No-Code Modules tutorial to create a no-code ready module that follows architecture best practices.
Review registry contentsYour registry now contains both the aws
provider and vpc
module in one place, with centralized access to documentation and configuration examples for your organization to use. Navigate back to your registry's landing page.
Under the Providers tab, you will find your AWS provider. The Modules tab has your vpc
module.
Navigate to the vpc
module details page. Notice that the Add to HCP Terraform button now says Manage Module for Organization. This confirms that the module is currently in your private registry.
Click on Manage Module for Organization, then Delete module.
Enter the module name (vpc
) and click the Delete button to confirm removing the vpc
module from your private registry.
Similarly to the module, navigate to the aws
provider page in your registry, and select Delete from organization under the Manage Provider for Organization dropdown.
Enter the provider name (aws
) and confirm removing the provider from your organization by clicking Remove.
In this tutorial, you learned how to curate providers and modules in your HCP Terraform private registry. You searched for providers and modules, reviewed their details, and added and removed them from your registry. Curating providers and modules allows you to establish your HCP Terraform private registry the source for Terraform configuration components for your organization, and give your team a consistent workflow as they scale their use of Terraform.
For more information on topics covered in this tutorial, review the following resources:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4