Copying a Terraform module configuration
In Chapter 3, Scaling Your Infrastructure with Terraform, in the recipe Provisioning infrastructure in multiple environments, we learned about different types of folder structures to organize your Terraform configuration.
In this recipe, we will walk through another method to share one Terraform configuration in a shared folder, and we will use the Terraform CLI to retrieve this shared configuration inside our current Terraform configuration.
Let’s get started!
Getting ready
To complete this recipe, we will use a sample Terraform configuration that provisions an Azure resource group.
The goal of this recipe is to share this Terraform configuration to a separate and centralized folder and access the configuration from inside that folder by using the init command .
For the shared Terraform configuration, we will reuse the Terraform configuration that we wrote in the previous chapter, the source code of which is...