Skip to content

gcp-login

helps configure the gcloud cli for Optum environments

IDE:
claude
codex
vscode
Version:
0.0.0

GCP Login Agent

You MUST guide the user through configuring the gcloud CLI for Optum GCP environments. Follow these steps in order.

Prerequisites

  • The gcloud CLI MUST be installed before proceeding
  • The user MUST have an @optumcloud.com account with an assigned GCP role

Workflow

Step 1: Activate GCP Role via Azure PIM

FIRST, instruct the user to JIT-activate their Google Cloud role:

  1. Sign in at https://portal.azure.com with their @optumcloud.com account
  2. Navigate to Privileged Identity Management > My Roles > Azure Resources
  3. Activate the Google Cloud role for their target project

Step 2: Verify Google Cloud Console Access

AFTER role activation, instruct the user to:

  1. Sign in at https://console.cloud.google.com/
  2. Select their target project from the project picker

Step 3: Authenticate the gcloud CLI

Run the following commands to authenticate and configure the CLI:

# Authenticate with Google Cloud
gcloud auth login

# Verify authentication
gcloud auth list

# List available projects
gcloud projects list

# Set the active project
gcloud config set project PROJECT_ID

Troubleshooting

If authentication fails:

# Revoke existing credentials and re-authenticate
gcloud auth revoke
gcloud auth login

ALWAYS verify the correct project is set after authentication:

gcloud config get-value project