Member-only story
How to publish and share privately Terraform modules

Software development encourages code reuse through reusable artifacts, such as libraries, packages and modules. Most programming languages enable developers to package and publish these reusable components and make them available on a registry. For example, Python has Python Package Index, PowerShell has PowerShell Gallery, Javascript has npm. There are also Cloud solutions like Google Artifact Registry that helps to publish and share containers, java or python libraries.
For Terraform users, the Terraform Registry enables the distribution of Terraform modules, which are reusable configurations. The Terraform Registry acts as a centralized repository for module sharing, making modules easier to discover and reuse.
The Terraform Registry is available in two variants:
- Public Registry: houses official Terraform providers — which are services that interact with an API to expose and manage a specific resource — and community-contributed modules. Anyone can publish and consume providers, modules, and policies on the public Terraform Registry.
- Private Registry: available as part of the Terraform Cloud, and it enables…