Getting started using Terraform for GCP
In the previous recipes of this chapter, we learned how to use Terraform on AWS.
In this recipe, we will learn how to create a GCP service account and provision resources in GCP using Terraform.
Let’s get started!
Getting ready
Before creating a resource in GCP with Terraform, we need to create a GCP service account that will have permission to provision resources in GCP.
To create a GCP service account using the console, perform the following steps:
- In the Services menu, select the IAM & Admin menu and select the Service Accounts submenu.

Figure 9.11: GCP Service Accounts menu
- Then, click on the CREATE SERVICE ACCOUNT button.

Figure 9.12: GCP CREATE SERVICE ACCOUNT button
- Fill in the Service accounts form:
- Enter the service account name and description and click on the CREATE AND CONTINUE button.
Figure 9.13: GCP service...