Billing
A billing account pays for usage. Projects don't pay - they link to a billing account, and one billing account can pay for many projects. Billing lives outside the resource hierarchy: it is its own object with its own IAM roles.
How consumption rolls up
Billing is read from the bottom of the resource hierarchy up. Each resource belongs to exactly one project, so a project accumulates the consumption of all its resources. Each project links to one billing account, and the organization contains every billing account. This is the mirror image of IAM: policies are inherited top-down, while consumption and billing accumulate bottom-up.
Linking projects
A project with no billing account attached cannot create billable resources. Moving a project between billing accounts is a single operation and doesn't disturb the resources.
- Billing Account Administrator - full control, link/unlink projects
- Billing Account User - can link projects to this account (the role you grant devs)
- Billing Account Viewer - read cost data only
- Project Billing Manager - links/unlinks a project without seeing billing data
"A developer must create projects and attach them to billing, but must NOT see company spend" = Billing Account User (on the account) + Project Creator (on the org). Never the Administrator role. This split-permission scenario is heavily tested.
Subaccounts and invoicing
Billing accounts are charged automatically and invoiced monthly, or sooner if spend reaches a threshold limit. A billing subaccount splits billing out by project while still rolling up to one parent billing account.
The classic use case: a partner who resells Google Cloud creates one subaccount per customer, so each client's usage is invoiced separately but consolidated under the reseller's billing account. "Separate billing per customer/project under one account" = subaccounts.
Budgets and alerts
A budget does not cap spend - it only triggers alert notifications (email, or Pub/Sub for automation) at threshold percentages. There is no built-in "hard stop."
You create one in three parts: Scope (name + which projects it covers), Amount, and Actions (the alert thresholds).
- Amount is either a specified amount (a fixed figure) or last month's spend (the budget re-baselines each month automatically).
- Alert thresholds are percentages of the amount - e.g. 50%, 90%, 100% - and each can also carry a dollar figure. Alerts email the Billing Admins when spend crosses a threshold.
- Trigger on is Actual (spend so far) or Forecasted (projected end-of-period spend).
- Beyond email, a budget can publish to a Pub/Sub topic for programmatic handling.
"Alert me before I'm going to blow the budget, not after" = Forecasted.
The alert email names the project, the percent of the budget exceeded, and the budget amount - enough to see at a glance which project needs attention.
The single most common billing trap: a budget of $100 does not shut anything off at $100. To actually stop resources you wire the budget's Pub/Sub notification to a Cloud Function that disables billing on the project. If the question says "prevent all further charges," the answer involves Pub/Sub + a function, never the budget alone.
Billing export to BigQuery
For anything beyond the console's built-in reports - custom queries, chargeback per team, long-term analysis - enable billing export to BigQuery. Detailed usage rows stream into a dataset you own, where SQL turns raw line items into answers.
Once the data lands it is just a table: filter to rows with cost > 0, pull the latest N
charges, or total everything over a threshold. The value is in repeating those queries
over time.
- Where spend concentrates - break down by service, SKU, project, or label
- How consumption trends - compare usage across days/months to spot growth
- Capacity planning - the trend is the input: scale up for growth, down for efficiency
- Chargeback / reporting - answer leadership's "what did team X cost?" from real line items
On the Billing export screen you pick one of two independent targets.
If a question asks which formats billing data exports to, the answer is CSV or JSON.
Visualize and optimize spend
Because labels propagate through billing, you can slice the export by any dimension you tag - and the slices point to savings. Label VM instances by region and you might spot instances sending most of their traffic to a distant continent: relocate them closer to users, or front them with Cloud CDN to cache content at the edge, cutting networking spend.
For a shareable view, point Looker Studio at the exported BigQuery data. It turns raw line items into customizable dashboards - daily, monthly, and by-project - that you can slice by your labels.