» Adding Public Modules to the Terraform Cloud Private Module Registry
Hands-on: Try the Add Public Modules to your Private Module Registry tutorial on HashiCorp Learn.
You can add modules from the public Terraform Registry to your Terraform Cloud private module registry. Once added, Terraform Cloud automatically synchronizes public modules with their source on the Terraform Registry. The private module registry handles downloads and controls access with Terraform Cloud API tokens, so consumers don't need access to the module's source repository, even when they run Terraform from the command line.
All members of an organization can view and use public modules, but you need owners team permissions to add them to the private module registry. Owners can add modules through the UI as shown below or through the Registry Modules API.
Note: Public modules are not supported in Terraform Enterprise.
» Adding a Public Module
Click "Registry" in the main navigation bar to go to your organization's module registry and then click "Find public modules".
The "Search Public Modules" page appears.
Enter any combination of namespaces (e.g. hashicorp), module names, and provider names to find public modules.
Do one of the following to add a module to your private module registry:
- Hover over the module and click "+ Add".
- Click the module to view its details and then click "Add to Terraform Cloud".
Click "Add to organization" in the dialog box. The module is now included in the private module registry's list of available public modules, and members of your organization can begin using it.
» Deleting a Public Module
Deleting a public module from a private module registry does not remove it from the Terraform Registry. To delete a public module from your organization's module registry:
Select the module to view its details, open the "Manage Module for Organization" dropdown menu, and click "Delete module".
Enter the module name in the dialog box to confirm and then click "Delete."