terraform

Share Modules Across Organizations with Terraform Enterprise

Terraform Enterprise now offers customers the ability to consume private modules across organizations, providing greater management consistency.

HashiCorp Terraform modules are considered the building blocks for provisioning and managing infrastructure. At their core, modules are a collection of Terraform configuration files that provide a simple and efficient way to standardize common pieces of infrastructure for quick and easy re-use. You can reference modules from several different places, including the Terraform Registry, which contains more than 5,000 modules contributed by both HashiCorp and the Terraform community.

There are times where a module has to be designed in accordance with internal compliance policies or based on a particular use case. This is where the private module registry comes in extremely handy. The private module registry, available in both Terraform Cloud and Terraform Enterprise, allows you to confidentially share and consume modules that are sourced from the registered version control system (VCS)

One of the more frequent requests we’ve heard is for the ability to share modules between different Terraform Enterprise organizations. We’re pleased to announce that as of Terraform Enterprise version 202012-1 and later, modules may be shared from one Terraform organization to any other Terraform organizations within the same Terraform Enterprise environment.

»Sharing Modules Across Organizations

The ability to share modules across multiple organizations offers a lot of advantages. The main benefit is around the management of these shared modules. This would include limiting the amount of VCS registrations required for an organization, in this case for access to where the modules may be maintained. There’s also no longer a need to manually add modules to each organization. Plus, this promotes consistency in module usage across the organizations since the shared modules act as a single source of truth.

You can set up module sharing from the Site Administration area of a Terraform Enterprise instance. The Registry subsection allows an organization to be chosen to which your current organization’s private module registry will be shared. This registry can be shared with specific organizations or all organizations.

Registry sharing

Sharing an organization's registry will share all modules in that registry but will not impact other organization’s registries. It is easy to differentiate the shared modules from the individual organization’s modules due to the addition of the “private” or “shared” tags. You can also filter modules by organization, choosing to see only your own organization's modules or only shared modules.

private module registry

»Summary

Modules for HashiCorp Terraform are an easy way to make provisioning infrastructure simple and consistent. The Terraform Registry has a wealth of publicly available modules. Additionally, modules can also be shared and consumed through the private module registry, available in Terraform Cloud and Terraform Enterprise. Furthermore, for Terraform Enterprise customers, a registry can be shared throughout the entire environment or specific organizations.

For more information on Terraform Enterprise, visit the Terraform product page. To learn more about Terraform modules and the private module registry, see the HashiCorp Learn platform to walk through creating and sharing modules of your own.


Sign up for the latest HashiCorp news

By submitting this form, you acknowledge and agree that HashiCorp will process your personal information in accordance with the Privacy Policy.