Google Cloud Budgets

How to set up Google Cloud budget alerts that reach you in time

Google Cloud budget alerts trigger when your spend crosses set percentages, but they do not stop usage and they do not run in real time. Default alert rules fire at 50%, 90%, and 100% of your target amount, yet reporting delays mean you might not get your first alert until several hours after a spike begins.

To catch overruns before your invoice jumps, you need to configure thresholds against forecasted spend alongside actual spend, route notifications to the right team members or chat channels, and set your target amount below your actual spending limit.

What Google Cloud budget alerts do and do not do

A Cloud Billing budget is an alerts-only tool. Setting a budget does not shut down virtual machines, pause APIs, or put a hard cap on your credit card. Each Cloud Billing account can have up to 50,000 budgets associated with it, and each one monitors spend across a defined scope.

You can configure budgets for recurring calendar periods (monthly, quarterly, or yearly) or a non-recurring custom date range. Monthly is the default time period. For any calendar or custom range, the start time begins at 12 AM US and Canadian Pacific Time (UTC-8). If you pick a custom date range, the From start date is required and must be after January 1, 2017.

Spend can be tracked as a fixed 'Specified amount' across all time ranges, or dynamically as 'Last period's spend' for recurring calendar periods. By default, all Savings types (discounts and credits) are selected when creating a budget, calculating spend as total cost minus those deductions. If your account gets charged monthly taxes such as VAT, that tax is included in threshold calculations and can push your spend over a threshold.

To handle late-reported costs and taxes, a monthly budget continues to track costs for the first two days of the following month. For August, costs are tracked through September 2.

Threshold rules: actual vs forecasted spend

When you set up a budget, Google Cloud applies three default alert threshold rules at 50%, 90%, and 100% of the budget amount, calculated against Actual spend. Those three numbers are rarely enough if you want early warnings.

Threshold rules can evaluate two distinct metrics:

  • Actual spend: Cumulative cost accrued during the budget period.
  • Forecasted spend: Estimated cost calculated out to the end of the current calendar budget period.

Budgets configured for a custom time range cannot trigger alerts on Forecasted costs; you can only use forecasted alerts on recurring calendar ranges like monthly budgets.

Because usage data takes hours to post, waiting for an actual spend threshold of 100% means you are already too late. A runaway script can run up hundreds of dollars while the dashboard still reports you under budget. To give yourself a warning window, pair an actual threshold at 50% with forecasted thresholds at 80% or 100%.

Time periodSpend amount typesForecasted spend alerts supported?Default alert thresholds
Monthly (default)Specified amount, Last period's spendYes50%, 90%, 100% (Actual)
QuarterlySpecified amount, Last period's spendYes50%, 90%, 100% (Actual)
YearlySpecified amount, Last period's spendYes50%, 90%, 100% (Actual)
Custom date rangeSpecified amount onlyNo50%, 90%, 100% (Actual)

Scoping your budget

A budget can cover an entire Cloud Billing account, or you can narrow it down. The available scopes are:

  • An entire Cloud Billing account.
  • One or more organizations, folders, or projects associated with the account.
  • One or more specific services (such as BigQuery or Compute Engine).
  • Resources with a specific label.

Watch out for how project filters handle miscellaneous fees. If you select specific projects rather than Select all, charges not specific to a project - like Google Cloud Support costs or subscriptions - are excluded from the calculations.

Label scoping has limits too. In a billing-account-level budget, you can apply only one label per budget. You can only choose user-created labels applied to Google Cloud services with usage; user labels without usage and labels applied directly to a project cannot be selected as a budget scope.

Who receives budget alert emails?

By default, role-based email notifications send budget alerts to every user who has roles/billing.admin (Billing Account Administrator) or roles/billing.user (Billing Account User) on the billing account. If an engineer is running resources in a project but lacks those billing account roles, they will not see the alert.

If you scope a budget to a single project, an additional checkbox appears: 'Email alerts to project owners'. That sends alerts to anyone with the Project Owner role on that project.

Customizing email recipients with Cloud Monitoring

If you want alerts sent to developers who do not have billing roles, you can link up to five Cloud Monitoring email notification channels to the budget:

  1. Ensure you have the Monitoring Editor role (roles/monitoring.editor) on the project where the notification channel is created. Linking existing channels to an existing budget requires roles/monitoring.viewer.
  2. For Cloud Billing budget alerts, you can only link Email notification channels. Other Cloud Monitoring channel types are not supported for budget alerts.
  3. If recipients click the link in the email to view the budget in the console, they need the Billing Account Viewer role on the billing account (for account-level budgets) or Project Viewer on the project (for single-project budgets).
  4. If the Cloud Billing account has no usage, no email notification is sent to Cloud Monitoring email channels. If the channel is misconfigured or deleted, delivery fails silently without notifying you.

How to send budget alerts to Slack via Pub/Sub

Google Cloud cannot send budget alert emails directly to Slack, but it can publish budget events to a Pub/Sub topic. Programmatic notifications behave differently from emails: emails only send when a threshold is crossed, but Pub/Sub receives status messages multiple times per day, even if the billing account has zero usage.

You can wire those messages to Cloud Functions or another service to post into Slack, or automate tasks like disabling billing on a project.

Pub/Sub setup requirements

To create and link a Pub/Sub topic using predefined roles, you need the Pub/Sub Admin role on the target project containing the topic. For custom roles, you need pubsub.topics.setIamPolicy and pubsub.topics.list.

If your organization policy enforces iam.allowedPolicyMemberDomains, connecting a Pub/Sub topic to Cloud Billing will fail unless you exempt the project containing the topic from that policy constraint.

Threshold requirements for Pub/Sub

If you want the Pub/Sub JSON payload to include data for alertThresholdExceeded and forecastThresholdExceeded, you must configure at least one alert threshold rule on the budget and enable at least one email notification option. Removing all threshold alert rules disables all email settings and stops threshold fields from appearing in the Pub/Sub payload.

Pub/Sub messages include three top-level attributes:

  • billingAccountId
  • budgetId
  • schemaVersion (example value: 1.0)

The message data itself is a base64-encoded UTF-8 JSON string containing:

  • budgetDisplayName
  • costAmount
  • costIntervalStart
  • budgetAmount
  • budgetAmountType (SPECIFIED_AMOUNT, LAST_MONTH_COST, or LAST_PERIODS_COST)
  • currencyCode
  • alertThresholdExceeded (omitted if no threshold is exceeded; formatted as a decimal like 0.9 for 90%)
  • forecastThresholdExceeded (omitted if no threshold is exceeded)

Keep in mind that Pub/Sub only provides at-least-once delivery, so messages can arrive out of order or more than once. If delivery fails because the topic was deleted, permissions were lost, quotas were exceeded, or the topic was misconfigured, you will not receive an error notification.

For more details on chat integrations across providers, see How do I send cloud billing alerts to Slack or Discord?.

Permissions needed to create budgets

To create a budget at the billing account level using predefined roles, you need one of these roles on the Cloud Billing account:

  • Billing Account Costs Manager
  • Billing Account Administrator

If you only manage an individual project and do not have billing account permissions, you need these project-level permissions at a minimum:

  • resourcemanager.projects.get
  • billing.resourcebudgets.read
  • billing.resourcebudgets.write
  • billing.resourceCosts.get (optional)

Catching spikes before Google Cloud reports them

After you create a budget, it can take several hours before you receive the first email or Pub/Sub message. Google Cloud documents a delay between when you use resources and when those costs report to Cloud Billing. To deal with this delay, Google recommends setting your budget amount below your available funds.

For details on exporting this data, see How do I export Google Cloud billing data to BigQuery, and how fresh is it?.

Because Cloud Billing reports hours behind, relying on it alone leaves a window where runaway spend can accumulate. Costbrake solves this by monitoring Cloud Billing export data alongside live Cloud Monitoring metrics. It tracks usage for the Gemini API, Vertex AI, Cloud Run, and Cloud Run functions at list price before the billing export catches up.

# Example gcloud commands to grant read-only export access
PROJECT_ID="my-billing-export-project"
TABLE="billing_export.gcp_billing_export_v1_0123AB_CDEF45_6789AB"
SA="costbrake-reader@${PROJECT_ID}.iam.gserviceaccount.com"

gcloud projects add-iam-policy-binding "$PROJECT_ID" \
  --member="serviceAccount:${SA}" \
  --role=roles/bigquery.jobUser --condition=None

bq add-iam-policy-binding \
  --member="serviceAccount:${SA}" \
  --role=roles/bigquery.dataViewer \
  --table=true "${PROJECT_ID}:${TABLE}"

Costbrake reads your billing export about once an hour and estimates Gemini API, Vertex AI, Cloud Run and Cloud Run functions spend from Cloud Monitoring every 5 minutes on paid plans (every 2 minutes during a spike), triggering alerts if an hour costs more than 3x the 7-day baseline and at least $5 over normal. If you need a hard safeguard, Costbrake provides an opt-in spend cap brake that can set a zero Google spend cap on a specific service in a project. For setup, follow the instructions in the agent setup guide or check Costbrake pricing. To understand how hard limits work in GCP, read Can I cap my Google Cloud spend, and how do the new spend cap budgets work?.

Questions and answers

How often are Google Cloud budgets evaluated?

Budget alert emails evaluate whenever Google processes billing data, but emails only send when a threshold rule is exceeded. Programmatic Pub/Sub notifications are sent multiple times per day with current budget status, even if there is zero usage.

Why did I receive a budget alert hours after my usage spiked?

Google Cloud has an inherent reporting delay between the moment a resource is used and when the usage cost reports to Cloud Billing. After creating or updating a budget, it can take several hours before receiving notifications.

Can Google Cloud budget alerts send directly to Slack?

Not directly out of the box. Google Cloud budget alerts only support email notifications natively; to send them to Slack, you must connect the budget to a Pub/Sub topic and use a webhook or function to forward the payload.

Who receives Google Cloud budget alert emails by default?

By default, alert emails go to all users assigned the Billing Account Administrator (roles/billing.admin) or Billing Account User (roles/billing.user) roles on the billing account. If scoped to a single project, you can also send alerts to Project Owners.

Can I set budget alerts on forecasted spend for custom date ranges?

No. Budget thresholds on forecasted spend are only supported for recurring calendar time ranges, such as monthly, quarterly, or yearly budgets. Custom date ranges only support alerts on actual spend.

Sources

Updated