Using public module repositories
Note
The code for this section is under the chap04/registry
directory in the GitHub repo of this book.
For Google Cloud, there are two main public module repositories. The official Terraform Registry at https://registry.terraform.io/browse/modules?provider=google and Terraform blueprints for Google Cloud at https://cloud.google.com/docs/terraform/blueprints/terraform-blueprints.
Note
Please note that there is some overlap between the two repositories.
While the source code for both the Google blueprints and the Terraform Registry are stored in public GitHub repositories, The Terraform Registry provides some additional functionality. The interface to the Terraform Registry makes it easy to discover the module for our needs. In addition, the Terraform Registry supports versioning. That is, we can put a version constraint when we call a module to ensure that our code uses a specific version we have tested. For example, in the following code...