In the previous recipe, we learned how to use Terraform Cloud as a remote backend that is centralized, secure, and free of charge.
In this book, we have dedicated Chapter 5, Sharing Terraform Configuration with Modules, to the creation, usage, and sharing of Terraform modules. As a reminder, what we studied was publishing modules in the Terraform public registry, which is publicly accessible by all Terraform users, and sharing Terraform modules privately using a Git repository.
Concerning private module sharing, the Git repository system is efficient but does not offer a centralized platform for sharing and documenting modules like the public registry does. In order to provide companies with a private registry of their Terraform modules, HashiCorp has integrated this functionality into Terraform Cloud/Enterprise.
In this recipe, we will learn how to publish and use a Terraform module in the private registry of the Terraform Cloud.