How to set up billing budgets, configure alert thresholds, and use anomaly detection to catch unexpected spending on Google Cloud.


Why You Need Budgets

Without budgets, you find out about overspending when the invoice arrives. Budgets give you visibility into spending as it happens, and alerts notify you before costs spiral. This is essential for any account, whether personal, development, or production.


Billing Account Hierarchy

Understanding how billing is organized helps you scope budgets correctly:

Organization
  └── Billing Account (linked to a payment method)
        ├── Project A (all resources bill here)
        ├── Project B (all resources bill here)
        └── Project C (all resources bill here)
  • A project can be linked to at most one billing account at a time; if it is not linked to an active billing account, billing is disabled
  • One billing account can pay for multiple projects
  • Budgets can be scoped to the entire billing account, specific projects, specific services, or specific label groups

Creating Budgets

Navigate to Billing > Budgets & alerts in the Google Cloud Console.

Budget amount options:

TypeHow It Works
Specified amountA fixed dollar amount you set (e.g., $500/month)
Last month’s spendAutomatically tracks the previous month’s actual cost
Previous period’s spendTracks the previous calendar period (quarter, year)

Budget scope options:

ScopeUse Case
Entire billing accountCatch total overspending across all projects
Specific projectsPer-project budgets for team accountability
Specific servicesMonitor high-cost services like Compute Engine or BigQuery
Label-basedBudget for resources tagged with a specific label (e.g., environment:production)

Alert Thresholds

When you create a budget, you configure threshold rules that trigger email notifications.

Default thresholds: 50%, 90%, 100%

Threshold types:

TypeHow It Works
Actual spendTriggers when the cumulative cost so far this period crosses the threshold
Forecasted spendTriggers when Google’s cost forecast for the entire period crosses the threshold

Forecasted spend alerts are useful because they warn you early. If you are at 40% of your budget but only 10% through the month, the forecast will predict you will exceed 100% and alert you.

Alerts are sent via email to Billing Administrators and any users you add to the budget’s notification list.


Pub/Sub Notifications

For programmatic alerts, connect a Pub/Sub topic to your budget. This enables automation.

How it works:

  1. Create a Pub/Sub topic
  2. Link it to your budget
  3. Pub/Sub publishes messages multiple times per day with current budget status
  4. Write a subscriber (Cloud Function, Cloud Run) to act on the notifications

JSON payload includes:

  • costAmount — current spend
  • budgetAmount — budget limit
  • alertThresholdExceeded — which threshold was crossed (if any)
  • forecastThresholdExceeded — forecast threshold crossed (if any)
  • currencyCode

Common automation patterns:

  • Post to Slack or Teams when a threshold is crossed
  • Scale down non-critical resources at 90%
  • Disable billing on a project at 100% (extreme measure)
  • Send a daily digest of spending to stakeholders

Note: Pub/Sub notifications fire multiple times per day with current status, unlike email alerts which only fire once per threshold crossing. This makes them better for continuous monitoring.


Alerts vs Hard Spend Limits

This is a common source of confusion:

Budget alerts are notifications, not hard caps. When a budget threshold is crossed, Google sends an email and optionally a Pub/Sub message. It does not automatically stop your resources or prevent additional spending.

What People ExpectWhat Actually Happens
Spending stops at 100% of budgetYou get an email. Resources keep running. Costs keep accruing.
Resources are shut down automaticallyOnly if you build custom automation via Pub/Sub
Budget = credit card limitBudget = a monitoring threshold with notifications

To actually stop spending, you need to:

  • Manually disable billing on the project
  • Manually shut down or delete resources
  • Build automation via Pub/Sub that takes action on your behalf

Anomaly Detection

Google Cloud Billing includes built-in cost anomaly detection that identifies unexpected spending patterns.

How it works:

  • Google builds an expected spending baseline from your historical data
  • When actual spend significantly deviates from the expected pattern, an anomaly is flagged
  • Anomalies include: expected spend, actual spend, deviation amount and percentage, and root causes broken down by service, region, and SKU

Configuration:

  • Set a cost impact threshold — only notify when the anomaly exceeds a dollar amount you care about
  • Anomaly notifications are sent to Pub/Sub (same topic as budget notifications, or a separate one)
  • Without a threshold set, all anomalies trigger notifications (which can be noisy)

Tip: Set a cost impact threshold that matches your tolerance. For a personal account, 100 or more avoids noise from minor fluctuations.


Practical Guardrails

For personal or development accounts:

  • Set a budget at 150% of your expected monthly spend
  • Configure alerts at 50%, 80%, and 100%
  • Enable anomaly detection with a low threshold
  • Consider automating resource shutdown at 100% via Pub/Sub

For team or production accounts:

  • Set budgets per project or per label group
  • Use forecasted spend alerts to catch trends early
  • Integrate Pub/Sub notifications with your team’s Slack or PagerDuty
  • Review billing dashboards weekly, not just when alerts fire
  • Set up Billing Export to BigQuery for detailed analysis

TL;DR

  • Budgets are monitoring thresholds, not hard spend limits. They send alerts but do not stop resources.
  • Scope budgets to the entire billing account, specific projects, services, or label groups.
  • Use forecasted spend alerts to catch overspending early, before the month is over.
  • Connect Pub/Sub for programmatic notifications and automation (Slack, shutdown, etc.).
  • Anomaly detection identifies unexpected spending patterns automatically. Set a cost impact threshold to avoid noise.
  • To actually stop spending, you must disable billing or shut down resources manually or via custom automation.

Resources

Create Budgets and Alerts Official guide for creating, editing, and managing budgets.

Programmatic Budget Notifications How to set up Pub/Sub notifications for budget automation.

Cost Anomaly Detection Automatic detection of unexpected spending patterns.

Resource Labels Use labels to scope budgets to specific teams or components.

Cost Optimization Overview of all cost levers on Google Cloud.