Introduction
In multi-cloud environments, services running outside Google Cloud Platform—such as microservices deployed on AWS EC2 or workflows running on GitHub Actions—frequently need to interact with GCP resources like Cloud Storage or BigQuery. GCP Workload Identity Federation completely eliminates the security risk of managing long-lived static JSON private keys.
Step-by-Step CLI Configuration
gcloud iam workload-identity-pools create "github-actions-pool" \
--location="global" \
--display-name="GitHub Actions Pool"
gcloud iam workload-identity-pools providers create-oidc "github-provider" \
--workload-identity-pool="github-actions-pool" \
--location="global" \
--issuer-uri="https://token.actions.githubusercontent.com" \
--attribute-mapping="google.subject=assertion.subject,attribute.repository=assertion.repository"
← PreviousMastering AWS IAM Policies: Principle of Least Privilege in Practice
Next →GitOps with ArgoCD: Declarative Continuous Delivery for Kubernetes
Get in touch