O'Reilly logo

Google Cloud Platform Cookbook by Legorie Rajan PS

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

After the successful installation of Terraform on your machine, we'll build the Terraform configuration setup step by step:

  1. Set up the environment variables and the Google Cloud provider block
  2. Create the two additional compute disks
  3. Create the VM with two additional disks

Let's look into these steps in detail:

  1. The code for this recipe can be found in the Chapter07/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"}
  1. To execute the configuration, the provider needs to possess proper credentials. Credentials ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required