Gcloud Auth Activate-service-account -

With great power (a JSON key file) comes great responsibility (never commit it to GitHub).

Enter , the command that bridges the gap between human-driven development and machine-driven automation. What is a Service Account? Before diving into the command, let’s define the actor. A service account is not a person; it is a Google Cloud identity belonging to your application or virtual machine. It uses JSON keys (or OIDC tokens) instead of passwords. gcloud auth activate-service-account

gcloud auth activate-service-account terraform-runner@prod.iam.gserviceaccount.com \ --key-file=/secrets/terraform-key.json terraform apply A common pattern: A service account in Project-A is granted IAM roles in Project-B . By activating that account locally, you can manage resources across both projects without switching user identities. The Critical Security Warning Do not commit service account key files to source control. They are root credentials. If leaked, an attacker has programmatic access to your GCP resources. With great power (a JSON key file) comes