Integrating with GCP
As we have seen how we authenticate Terraform to Azure and AWS, we will similarly try to understand how Terraform can get authenticated to GCP.
There are multiple methods to authenticate Terraform to GCP, outlined as follows:
- Authentication using the Google Cloud Software Development Kit (SDK) CLI
- Authentication using a Google service account by storing credentials in a separate file
- Authentication using a Google service account by defining values in the environment variable
- Authentication using a Google service account by means of a valid token
Discussing all of the aforementioned methods is somewhat beyond the scope of this book, so we will just consider one method of authentication.
Authentication using a Google service account by storing credentials in a separate file
To authenticate a Google service account, perform the following steps:
- Log in to Google Cloud Console at https://console.cloud.google.com/ using your...