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. Terraform Cloud's private registry allows you to curate the modules and providers your organization uses, which eases discoverability.
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 a Terraform Cloud account and organization owner access.
»Add public provider to private registry
In your Terraform Cloud dashboard, click on Registry in the top menu bar, then click on Search public registry.
In the search bar, type
aws, then select the
On the provider details page, you will find:
- The provider name (
aws) and description.
- The badge on the top left, indicating that this provider is public.
- The provider version and publication date, which show whether the module is actively maintained. You can also select and review older versions of the provider.
- The provider owner responsible for maintenance and updates. HashiCorp is the provider owner for the
- The number of installations. A higher number correlates with broader community adoption.
- A link to the provider's source code repository.
- Tabs for the documentation and example configuration on the top righthand side.
To add the provider to your private registry, click on Add to Terraform Cloud in the top righthand corner.
Confirm by clicking Add to organization.
You have now added the provider to your private registry.
»Add public module to private registry
You can use a similar workflow to curate modules in your private registry.
Navigate back to your Terraform Cloud Registry, then click on Search public registry.
vpc into the search bar, then click on the Modules tab.
On the module page, you will find:
- The module name (
vpc) and description.
- The badge on the top left, indicating that this module is public.
- The number of installations.
- The version and publication date.
- The Submodules and Example dropdowns, which show the submodules this module uses and examples of configurations that use the module.
- Tabs for the module's README, inputs, outputs, dependencies, and resources. These sections offer guidance for how to use the module in your configuration.
- The box on the right allows you to add this module to your registry. It also contains an example configuration that you can use. Refer to the Examples dropdown or the source repository for additional example configurations.
Once you have reviewed this module, click the Add to Terraform Cloud button to add this
vpc module to your organization's private registry.
Confirm by clicking Add to organization.
»Review registry contents
Your 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
»Remove module from private registry
Navgiate to the
vpc module details page. Notice that the Add to Terraform Cloud button now says Manage Module for Organization. This confirms that the module is currently in your private module 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.
»Remove provider from 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 Terraform Cloud 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 Terraform Cloud 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: