GCP
The GCP integration connects your Google Cloud Platform environment to Sprigr Teams. With 32 actions spanning compute, serverless, storage, containers, data analytics, and monitoring, your agents can answer questions about your infrastructure, check resource status, and assist with routine cloud operations.
Prerequisites
Section titled “Prerequisites”- An active Google Cloud Platform project with the resources you want agents to access.
- Permission to create service accounts and manage IAM roles in your GCP project.
- Admin or Owner role in your Sprigr Teams organisation.
How authentication works
Section titled “How authentication works”The GCP integration uses a service account for authentication. You create a service account in your GCP project, grant it the permissions your agents need, and provide the JSON key to Sprigr Teams. This approach gives you full control over what your agents can access:
- You define the exact IAM roles assigned to the service account
- You can revoke access at any time by deleting the key or the service account
- All actions are logged in your GCP audit logs
Connecting GCP
Section titled “Connecting GCP”-
Create a service account in GCP
Open the Google Cloud Console and navigate to IAM & Admin > Service Accounts. Click Create Service Account.
- Name — Give it a descriptive name like “sprigr-teams-integration”
- Description — “Service account for Sprigr Teams agent access”
- Click Create and Continue
-
Assign IAM roles
Grant the service account the roles it needs. For read-only access across common services, assign:
- Compute Viewer — For Compute Engine instance queries
- Cloud Functions Viewer — For Cloud Functions information
- Storage Object Viewer — For Cloud Storage access
- Cloud Run Viewer — For Cloud Run service queries
- BigQuery Data Viewer — For BigQuery table and dataset queries
- Monitoring Viewer — For Cloud Monitoring metrics
- Logs Viewer — For Cloud Logging access
- Billing Account Viewer — For billing information
- Kubernetes Engine Cluster Viewer — For GKE cluster information
Click Continue, then Done.
-
Download the JSON key
From the service accounts list, click on the newly created account. Go to the Keys tab, click Add Key > Create new key, select JSON, and click Create.
A JSON key file will download to your computer. Keep this file secure — it grants access to your GCP project.
-
Open the Integration Hub
Sign in to team.sprigr.com and click Integrations in the sidebar.
-
Find GCP
Locate the GCP card and click Connect. This opens the GCP setup wizard.
-
Paste the JSON key
Open the downloaded JSON key file in a text editor, copy the entire contents, and paste it into the setup wizard’s key field.
-
Test the connection
Click Test Connection. Sprigr Teams will use the service account to make a basic API call to verify that everything works. If successful, click Save to complete the setup.
Available tools
Section titled “Available tools”Compute Engine
Section titled “Compute Engine”| Tool | Action | Description |
|---|---|---|
gcp | list_instances | List Compute Engine instances with optional filters |
gcp | get_instance | Get detailed information about a specific instance |
gcp | start_instance | Start a stopped instance |
gcp | stop_instance | Stop a running instance |
Cloud Functions
Section titled “Cloud Functions”| Tool | Action | Description |
|---|---|---|
gcp | list_functions | List Cloud Functions |
gcp | get_function | Get details about a specific function |
gcp | invoke_function | Invoke a Cloud Function |
gcp | list_function_logs | View recent function execution logs |
Cloud Storage
Section titled “Cloud Storage”| Tool | Action | Description |
|---|---|---|
gcp | list_buckets | List Cloud Storage buckets |
gcp | list_objects | List objects in a bucket |
gcp | get_object | Read an object from Cloud Storage |
gcp | upload_object | Upload an object to Cloud Storage |
Cloud Run
Section titled “Cloud Run”| Tool | Action | Description |
|---|---|---|
gcp | list_services | List Cloud Run services |
gcp | get_service | Get details about a specific Cloud Run service |
gcp | list_revisions | List revisions of a Cloud Run service |
BigQuery
Section titled “BigQuery”| Tool | Action | Description |
|---|---|---|
gcp | list_datasets | List BigQuery datasets |
gcp | list_tables | List tables in a dataset |
gcp | query | Run a BigQuery SQL query |
gcp | get_table_schema | Get the schema of a specific table |
Cloud Monitoring and Logging
Section titled “Cloud Monitoring and Logging”| Tool | Action | Description |
|---|---|---|
gcp | get_metrics | Query Cloud Monitoring metrics |
gcp | list_alert_policies | List alerting policies |
gcp | query_logs | Search Cloud Logging entries |
gcp | list_log_entries | List recent log entries with filters |
Billing
Section titled “Billing”| Tool | Action | Description |
|---|---|---|
gcp | get_billing_info | Get billing account information |
gcp | get_cost_breakdown | Get cost breakdown by service for a date range |
| Tool | Action | Description |
|---|---|---|
gcp | list_service_accounts | List service accounts in the project |
gcp | get_iam_policy | Get IAM policy bindings for a resource |
GKE (Kubernetes Engine)
Section titled “GKE (Kubernetes Engine)”| Tool | Action | Description |
|---|---|---|
gcp | list_clusters | List GKE clusters |
gcp | get_cluster | Get detailed information about a specific cluster |
gcp | list_node_pools | List node pools in a cluster |
gcp | list_workloads | List workloads running in a cluster |
Common use cases
Section titled “Common use cases”- Infrastructure status checks — “What Compute Engine instances are running in production?” — An agent queries your instances and returns a summary of names, states, machine types, and zones.
- Cost monitoring — “What are our top GCP costs this month?” — The agent retrieves billing data and presents a breakdown by service, highlighting any unexpected increases.
- Log investigation — “Show me errors from the payments Cloud Function in the last hour” — The agent queries Cloud Logging and returns matching entries with timestamps and error details.
- BigQuery analysis — “How many orders were placed last week?” — The agent runs a BigQuery query against your data warehouse and returns the results.
- GKE cluster health — “What’s the status of our production Kubernetes cluster?” — The agent checks cluster status, node pool health, and running workloads.
- Automated monitoring reports — A scheduled workflow queries metrics, alerts, and billing data each morning and sends a summary to your engineering channel.
Troubleshooting
Section titled “Troubleshooting”“Permission denied” errors The service account is missing the required IAM role for the resource or service being accessed. Add the appropriate Viewer or Admin role in the GCP IAM console.
“Service account key is invalid”
Make sure you copied the entire JSON key contents, including the opening and closing braces. The key should start with { and end with }.
Cannot access resources in a different project The service account is scoped to the project where it was created. To access resources in another project, grant the service account cross-project permissions in the target project’s IAM settings.
BigQuery queries timing out Complex or large-scale queries may exceed the default timeout. Consider optimising the query or breaking it into smaller parts.
Cloud Logging returning empty results Check that the log filter is correct and that the date range includes the time period you are looking for. Also verify that logging is enabled for the service in question.
Next steps
Section titled “Next steps”- AWS — Connect Amazon Web Services alongside or instead of GCP.
- Integrations Overview — See all available integrations.
- Workflows — Automate infrastructure monitoring and reporting with workflows.