How to use Terraform with GCP? How to authenticate Terraform with Google Cloud?
Thanks for stopping by. In this demo, we are going to start Terraform for Google Cloud Platform from scratch. We will be using GCP service account for Authentication mechanism from Terraform.
Activate your GCP service account:
gcloud auth activate-service-account {service-account-name}@{project-id}.iam.gserviceaccount.com --project={project-id} --key-file="PATH\filename.json"
Environment variable for Terraform authentication:
cmd# setx GOOGLE_APPLICATION_CREDENTIALS "PATH\filename.json"
ps# $Env:GOOGLE_APPLICATION_CREDENTIALS="PATH\filename.json"
Terraform Code: https://github.com/sdas92/gcp/tree/ma...
Google Provider Doc: https://registry.terraform.io/provide...
You can checkout my website: https://daslearning.in
#Terraform #GCP #google