After the successful installation of Terraform on your machine, we'll build the Terraform configuration setup step by step:
- Set up the environment variables and the Google Cloud provider block
- Create the two additional compute disks
- Create the VM with two additional disks
Let's look into these steps in detail:
- The code for this recipe can be found in the Chapter22/terraform file. The first part of configuring Terraform is setting up the Google Cloud provider, which is as follows. Save the configuration to a file, example.tf:
// Configure the Google Cloud providerprovider "google" { project = "<Project ID>" region = "us-central1"}
- To execute the configuration, the provider needs to possess proper credentials. Credentials ...