Google Cloud
Connect your GCP projects to enable CloudThinker agents to analyze costs, optimize resources, and manage infrastructure across Google Cloud services.Setup
1
Create Service Account
Set up a service account with viewer permissions
- Go to Google Cloud Console and select your project
- Navigate to IAM & Admin → Service accounts
- Click Create Service Account
- Enter details:
- Name:
cloudthinker-readonly - Description: Read-only access for CloudThinker monitoring
- Name:
2
Assign Roles
Grant the required viewer roles:
Viewer(basic read access)Monitoring Viewer(for monitoring data)Security Reviewer(for security analysis)
3
Generate JSON Key
Create and download a key file
- Click on the created service account from the list
- Go to Keys tab → Add key → Create new key
- Select JSON format and click Create
- Download the key file and store securely
4
Add Connection in CloudThinker
Navigate to Connections → GCP and:
- Upload the JSON key file, or
- Paste the JSON content directly
5
Test Connection
Click Test Connection to verify access
JSON Key Format
The service account key file contains:Required Roles
Minimum (Read-Only Analysis)
Recommended (Full Analysis)
Agent Capabilities
Once connected, agents can:| Agent | GCP Capabilities |
|---|---|
| Alex | Cost analysis, VM right-sizing, committed use recommendations, resource optimization |
| Oliver | Security Command Center findings, IAM audits, compliance checks |
| Tony | Cloud SQL performance, BigQuery optimization, Spanner tuning |
| Kai | GKE cluster management, workload optimization, Autopilot analysis |
Multi-Project Setup
For organizations with multiple GCP projects:1
Organization-Level Access
Grant the service account roles at the organization or folder level
2
Billing Account Access
Add Billing Account Viewer for cross-project cost analysis
3
Add Projects
CloudThinker will automatically discover accessible projects
Troubleshooting
Permission denied errors
Permission denied errors
- Verify the service account has required roles
- Check project-level IAM bindings
- Ensure APIs are enabled (Compute, Monitoring, etc.)
- Confirm the JSON key is valid and not expired
Invalid key file
Invalid key file
- Verify the JSON file is complete and properly formatted
- Check that the private key hasn’t been truncated
- Ensure no extra whitespace or characters were added
- Try regenerating the key from GCP Console
Missing billing data
Missing billing data
- Verify Billing Account Viewer role is assigned
- Enable Cloud Billing API
- Check billing export to BigQuery is configured
GKE access issues
GKE access issues
- Ensure Kubernetes Engine Viewer role is assigned
- Verify cluster is in an accessible project
- Check if cluster uses Workload Identity
Security Best Practices
- Minimal permissions - Grant only required viewer roles
- Project scope - Limit access to necessary projects only
- Key rotation - Rotate service account keys every 90 days
- Audit logging - Enable Cloud Audit Logs for API access tracking
- Key storage - Store JSON keys in secure credential managers