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](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1617301632-share-org-registry.png&w=3840&q=75)
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](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1617301665-private-module-registry-list.png&w=3840&q=75)
» 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
More blog posts like this one
![Terraform extension for VS Code speeds up loading of large workspaces](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1714155806-blog-library-product-terraform-dark-gradient.jpg&w=3840&q=75)
Terraform extension for VS Code speeds up loading of large workspaces
New releases of the HashiCorp Terraform extension for Visual Studio Code and Terraform language server significantly reduce memory usage and start up time for large workspaces.
![Why use Vault-backed dynamic credentials to secure HCP Terraform infrastructure?](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1572286031-vault-terraform-background.png&w=1920&q=75)
Why use Vault-backed dynamic credentials to secure HCP Terraform infrastructure?
Learn how HCP Terraform and Terraform Enterprise users can use Vault-backed dynamic credentials to secure their infrastructure during provisioning better than the base-level dynamic provider credentials.
![HCP Terraform adds granular API access for audit trails](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1714170900-blog-library-product-hcp-terraform-dark.jpg&w=3840&q=75)
HCP Terraform adds granular API access for audit trails
HCP Terraform eliminates the need to rely on organization permissions to the audit trails endpoint, streamlining permissions workflows and reducing risk.