Brains4Cloud
ESEN
Practice

Topic 5 of 5

D1 · Setting up a cloud solution environment

Billing: accounts, budgets, and exports

Without an active billing account, a project can't use Google Cloud services, not even the free ones. Section 1.2 of the exam guide asks you to create billing accounts, link projects, set up budgets and alerts, and export billing data.

The Cloud Billing account

It defines who pays for a set of resources. It accrues the costs (charges and savings) of every linked project and routes them to a Google payments account.

  • It is a cloud-level resource managed in the Google Cloud console, and access is controlled with IAM roles.
  • It pays for Google Cloud, Google Maps Platform, Firebase, and Google AI Studio. It doesn't pay for Google Workspace, which has its own billing account.
  • Billing is enabled on a project when it is linked to a billing account that is active and in good standing (not closed or suspended).
  • If the account is suspended or closed, the services in its projects stop working, even the free ones.

Account types and payments profiles

Self-serve (online)

  • Status: free trial or paid.
  • Credit or debit card, or ACH direct debit depending on the country.
  • You sign up online. The Postpay cycle is assigned automatically and can't be chosen or changed: monthly automatic payments or threshold billing.

Invoiced (offline)

  • Always paid, by check or wire transfer.
  • Invoices by mail or electronically, also visible in the console.
  • You must meet eligibility requirements; Google creates it on request.

When you create the account, you connect it to a Google payments profile (the responsible legal entity: country, currency, name, address, and payment methods). Its type can't be changed later:

ProfileCharacteristics
IndividualPersonal payments. Only the owner manages it, with no added users. One per user account.
Organization (Business)Payments on behalf of a business or institution. You can add users, who see the payment information. You can have several.

Subaccounts are for resellers: they group a customer's project charges in a section of the invoice. They are paid by the reseller's parent account, which must be on invoiced billing.

Ownership versus payment linkage

Ownership

IAM permission inheritance. A billing account belongs to a single organization. Anyone with billing roles on the organization has them on its accounts.

Payment linkage

Which account pays for each project. It isn't limited by the organization: an account can pay for projects in another organization.

Important

The billing account isn't the project's parent in the IAM sense: projects don't inherit permissions from the account they are linked to.

Billing roles

RoleWhat it allowsWhere it is granted
Billing Account Creator
roles/billing.creator
Create self-serve accounts. Google advises granting it to few people to prevent untracked spendOrganization
Billing Account Administrator
roles/billing.admin
The account owner role (can't create accounts): payments, exports, costs, linking and unlinking, managing roles. The account creator gets itOrganization or account
Billing Account Costs Manager
roles/billing.costsManager
Budgets, viewing costs, and managing the BigQuery export. Doesn't link projects or see pricingOrganization or account
Billing Account Viewer
roles/billing.viewer
View costs and transactions. Common for finance teamsOrganization or account
Billing Account User
roles/billing.user
Link projects to the account. Very restricted permissions, so it can be granted broadlyOrganization or account
Project Billing Manager
roles/billing.projectManager
Link and unlink the project, with no access to its resourcesOrganization, folder, or project
  • Billing Account User + Project Creator: create new projects already linked to that account.
  • Billing Account User + Project Billing Manager: link and unlink existing projects.
  • The project Owner role is a superset of Project Billing Manager.

Linking and unlinking projects

To link a project you need resourcemanager.projects.createBillingAssignment on the project (Project Billing Manager or Owner) and billing.resourceAssociations.create on the target account (Billing Account User or Administrator). It is a sensitive action that may ask you to reauthenticate.

gcloud billing projects link PROJECT_ID --billing-account=ACCOUNT_ID
  • If the project was already linked, the command moves it to the new account. The switch causes no downtime, but resource-based CUDs apply only in the destination account.
  • Disabling billing (unlinking) stops all Google Cloud services in the project. You still owe outstanding charges.
  • Linking a project to a closed account has the same effect as disabling its billing.
  • Using another customer's billing account to reduce fees may violate your Google Cloud terms.

A budget compares actual spend with planned spend and emails you when thresholds are crossed. You set it up in Billing → Budgets & alerts.

Period

Monthly, quarterly, yearly, or custom.

Scope

The whole account; one or more organizations, folders, or projects; specific services; or resources with a label.

Amount

Specified amount (fixed) or Last period's spend (the previous period's spend, recurring periods only).

A budget isn't a cap

An alerts-only budget doesn't stop usage or spending when the amount is reached. Google recommends setting it below your available funds because of usage reporting delays.

  • Account-wide budgets need permissions on the billing account; a single-project budget only needs billing permissions on that project.
  • Each billing account supports up to 50,000 budgets.

Thresholds and recipients

Threshold rules

  • Default: 50%, 90%, and 100% of actual spend.
  • Actual: spend accrued in the period. Forecasted: projection to the end of the period (not available for custom periods).
  • A monthly budget keeps tracking for the first two days of the next month to catch late-reported usage.
  • Actual spend is calculated after savings; taxes such as VAT are included.

Notifications

  • By default, email to Billing Account Administrators and Users.
  • For single-project budgets, also to its Project Owners.
  • For other people, link Cloud Monitoring email channels.
  • To automate, connect a Pub/Sub topic: forward to Slack or disable a project's billing.

If you only want programmatic notifications, remove all threshold rules: that turns off the emails.

Spend cap budgets

For eligible services, Cloud Billing offers a second kind of budget: when the gross estimated cost exceeds 100% of the amount, usage of the service is paused automatically in that project for the rest of the period, unless you lift the cap manually.

Eligible servicesGemini API, Gemini Enterprise Agent Platform (formerly Vertex AI), Cloud Run, and Cloud Run functions
ScopeA single project and a single service. No folders, organizations, labels, or multiple projects
PeriodMonthly only, from the 1st
CostGross estimate at list price, without savings or credits
AlertsAt 50%, 80%, and 100%. When enforced, email to billing admins and project owners
What it doesn't pauseIn-flight requests, which complete and are charged, and fixed usage of persistent resources such as compute or storage
Lifting itAutomatically at the start of next month, or manually by editing the budget (services take up to an hour to return)

It automatically exports detailed usage, cost, and pricing data to a BigQuery dataset throughout the day. Google recommends turning it on when you create the billing account so you have data from the start.

Export typeContents
Standard usage costAccount, invoice date, services, SKUs, projects, labels, location, cost, credits. For broad trends
Detailed usage costEverything above plus resource-level cost (a VM, an SSD). For GKE you must also enable cost allocation
Pricing dataThe account's service and SKU prices
FOCUS usage cost (preview)Costs normalized with the FinOps FOCUS open specification
Committed Use Discounts (preview)Daily CUD metadata
  • Permissions: BigQuery User on the dataset's project and Billing Account Costs Manager or Administrator on the account.
  • With a multi-region dataset (US or EU), the first time it loads data from the start of the previous month; the backfill can take up to five days. Only a subset of single regions is supported.
  • If you delete exported tables, those records are gone for good. When you switch datasets, earlier data isn't copied over.
  • Storing and querying the data incurs normal BigQuery charges.

Other cost tools

Billing reports

Answer questions such as which service costs the most.

Anomalies

Cost spikes compared with history, in a dashboard per account.

FinOps hub

Current savings, recommendations, and wasted usage.

Committed use discounts (CUDs)

A discount in exchange for committing to a minimum level of usage for a term.

Exam scenarios

SituationAnswerWhy
Developers must create projects billed to the company accountBilling Account User + Project CreatorTogether they create projects linked to that account.
Finance must see costs and invoices without linking projectsBilling Account ViewerRead-only access to costs and payments.
Someone must manage budgets and the export, but not payment methodsBilling Account Costs ManagerBudgets and export, no account properties.
Notify the project manager, who isn't a billing adminCloud Monitoring email channel on the budgetCustom recipients.
Disable billing automatically when the budget is exceededPub/Sub programmatic notification + functionAlerts-only budgets don't stop spending.
Stop a project's Gemini API calls at $500 a monthSpend cap budgetPauses the eligible service until next month.
Analyze cost per individual VMDetailed usage cost exportIncludes resource-level data.

Common exam traps

❓ Does a budget stop spending at 100%?

An alerts-only budget doesn't. Only spend cap budgets pause services, and only eligible ones in a single project.

❓ Do projects inherit permissions from their billing account?

No. The billing account isn't the project's IAM parent.

❓ Can a billing account pay for projects in another organization?

Yes. Ownership is limited to one organization; payment linkage isn't.

❓ Can Billing Account Viewer link projects?

No. Linking needs Billing Account User (or Administrator) on the account and Project Billing Manager (or Owner) on the project.

❓ Can you change a payments profile from Individual to Organization?

No. The profile type can't be changed after it is created.

❓ What are a budget's default thresholds?

50%, 90%, and 100% of actual spend.

❓ Does turning on the export today bring old data?

With a multi-region dataset, from the start of the previous month. Nothing older, which is why you should turn it on when you create the account.

Did you get this topic?

Test what you just learned

A finance team must create budgets for the billing account and set up the cost export to BigQuery, but it must not be able to change payment methods or link projects. Which role do you grant on the billing account?

Ready to test "Billing: accounts, budgets, and exports"?

Original questions, each with a full explanation.

Start a mock exam