» 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.

» Adding a Public Module

  1. Click "Registry" in the main navigation bar to go to your organization's module registry and then click "Find public modules".

    Terraform Cloud screenshot: the "registry" button and the "find public modules" button

    The "Search Public Modules" page appears.

    Terraform Cloud screenshot: the Search Public Modules page

  2. Enter any combination of namespaces (e.g. hashicorp), module names, and provider names to find public modules.

  3. Do one of the following to add a module to your private module registry:

    • Hover over the module and click "+ Add". Terraform Cloud screenshot: the "+ Add" button
    • Click the module to view its details and then click "Add to Terraform Cloud". Terraform Cloud screenshot: the "+ Add" button
  4. 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:

  1. Select the module to view its details, open the "Manage Module for Organization" dropdown menu, and click "Delete module". Terraform Cloud screenshot: the delete module button

  2. Enter the module name in the dialog box to confirm and then click "Delete."