This chapter covers GCP billing accounts, budgets, and alerts — a core area for the ACE exam under Objective 4.2: 'Manage billing and cost optimization.' You will learn how billing accounts are structured, how budgets and alerts work, and how to configure them to control costs. Expect 2-4 exam questions on these topics, often testing your understanding of billing account types, budget thresholds, and alerting mechanisms. Mastery of this content is essential for any cloud engineer responsible for cost management.
Jump to a section
Think of a Google Cloud billing account as a corporate credit card assigned to a department. The credit card has a credit limit (spending limit) and an issuer (billing account owner). Individual employees (projects) can make purchases (use services) using the card, but the card itself is the single source of truth for all charges. The department head (billing administrator) can set per-employee spending limits (budgets) and receive alerts when an employee is close to exceeding their limit. If an employee tries to make a purchase that would exceed the limit, the card may be declined (disable billing) or the department head gets a notification. The credit card statement (invoice) is generated monthly and sent to the department head, who can see a breakdown of charges per employee (project). Multiple employees can share the same card, but the card must be activated (linked to a Cloud Billing account) before any employee can make purchases. If the card is deactivated (billing account suspended), all employees lose purchasing ability until the card is re-enabled. This mirrors GCP billing accounts: they aggregate costs across projects, define payment method, and enable service usage. Budgets and alerts act as spending limits and notifications, preventing surprise bills.
What is a GCP Billing Account?
A Google Cloud billing account is a financial entity that collects all charges from associated projects and generates invoices. It is the top-level container for payment configuration, cost aggregation, and budget management. Without a valid billing account, you cannot use most GCP services (except free-tier resources). Each project must be linked to a billing account, and a billing account can serve multiple projects.
Types of Billing Accounts
Google Cloud offers two types of billing accounts: - Self-serve (pay-as-you-go): You provide a credit card or debit card. You are charged monthly for usage. This is the default for new accounts. - Invoiced (monthly): You receive a monthly invoice with payment terms (e.g., net 30 days). This requires a credit check and is typically used by enterprises with large spending.
The exam tests that you know the difference: self-serve uses automatic card charges; invoiced requires manual payment via invoice.
Billing Account Hierarchy
A billing account exists outside any project. It is linked to a Cloud Identity or Google Workspace account. The hierarchy is:
Cloud Identity/Google Workspace → Billing Account → Projects → Resources
A single billing account can be linked to multiple projects. A project can only be linked to one billing account at a time. You can change the billing account for a project, but this may affect active services.
Roles and Permissions
IAM roles control billing access. Key roles: - Billing Account Creator: Can create new billing accounts. - Billing Account Administrator: Full control over billing account (change payment method, manage budgets, close account). - Billing Account User: Can link projects to the billing account but cannot view costs. - Billing Account Viewer: Can view billing account costs and transactions but cannot modify anything. - Project Billing Manager: Can link/unlink a project to a billing account (role assigned at project level).
Budgets and Alerts
A budget is a spending limit you define for a billing account or a project. It does not cap spending by default; it only triggers alerts. However, you can optionally configure budget-based alerts to disable billing for a project when the budget is exceeded.
Key budget components: - Scope: Can be applied to a billing account, a specific project, or a set of projects using labels or organizations. - Amount: A fixed amount or a percentage of the previous month's spend. - Alerts: You set threshold rules (e.g., 50%, 90%, 100%) that trigger Pub/Sub notifications or email alerts. - Actions: You can enable 'Disable billing' for a project when the budget is exceeded (this is a separate budget action, not an alert).
How Budgets Work Internally
Google Cloud continuously monitors resource usage and updates cost data with a delay of up to 5-6 hours. Budget alerts are evaluated against the most recent cost data, not real-time usage. This means you may receive alerts after the cost has already been incurred. The budget does not prevent usage; it only notifies you.
When a budget threshold is crossed, Cloud Billing sends a notification to Pub/Sub (if configured) or via email. You can automate responses using Cloud Functions triggered by Pub/Sub messages.
Configuring Budgets and Alerts
You can create budgets via the Cloud Console, gcloud CLI, or API. Example gcloud command:
gcloud billing budgets create \ --billing-account=XXXXXX-XXXXXX-XXXXXX \ --display-name="Monthly Budget" \ --budget-amount-currency-code=USD \ --budget-amount-units=1000 \ --threshold-rule=percent=0.5,spend-basis=CURRENT_SPEND \ --threshold-rule=percent=0.9,spend-basis=CURRENT_SPEND \ --threshold-rule=percent=1.0,spend-basis=FORECASTED_SPEND \ --notification-promoter-project-id=my-project \ --notification-promoter-topic=budget-alerts
This creates a $1000 budget with alerts at 50%, 90%, and a forecasted alert at 100%. The spend-basis can be CURRENT_SPEND (actual spend) or FORECASTED_SPEND (predicted end-of-month spend).
Budget Actions: Disable Billing
You can configure a budget to disable billing for a project when the budget is exceeded. This is done by enabling 'Disable billing' in the budget action settings. When triggered, the project's billing account is removed, causing all paid services to stop. This is a hard stop; you must manually re-enable billing.
Budget Alerts and Pub/Sub
For automated responses, you can set up a Pub/Sub topic that receives budget notifications. The notification message contains details like the budget name, current spend, and threshold exceeded. You can then use Cloud Functions, Cloud Run, or other services to act on the alert (e.g., scale down resources, send Slack messages).
Reports and Cost Management
The Cloud Billing console provides reports and cost breakdowns by project, service, and label. You can export billing data to BigQuery for custom analysis. This is useful for chargeback and showback scenarios.
Billing Account Suspension
If payment fails (e.g., expired credit card), the billing account is suspended after a grace period (typically 30 days). During suspension, all linked projects lose access to paid services. You can restore the account by updating payment information.
Exam-Relevant Details
Default budget alert thresholds: You can set any percentage, but common exam scenarios use 50%, 90%, 100%.
Budget scope can be at billing account, project, or filtered by labels/organization.
Budgets do not prevent spending; they only alert. To stop spending, you must use budget actions to disable billing.
Forecasted alerts use machine learning to predict end-of-month spend based on current usage.
Billing export to BigQuery includes detailed cost and usage data with up to 5-6 hour delay.
IAM roles: Billing Account User can link projects but not view costs; Billing Account Viewer can view costs but not link.
Interaction with Related Technologies
Cloud Monitoring: Budget alerts can be integrated with Monitoring alerts for unified alerting.
Cloud Pub/Sub: Budget notifications can be sent to Pub/Sub for automation.
Cloud Functions: Can subscribe to Pub/Sub budget alerts to auto-stop expensive resources.
BigQuery: Billing export to BigQuery enables custom cost analysis and dashboards.
Common Pitfalls
Confusing budget alerts with actual cost capping. Budgets do not cap spending; they only notify. To cap, you must enable disable billing action.
Expecting real-time alerts. Budget alerts are based on cost data that is updated every 5-6 hours, so alerts are delayed.
Forgetting to assign proper IAM roles. Users need Billing Account User to link projects, not just Viewer.
Create a Billing Account
Go to the GCP Console > Billing > Create Account. Choose either self-serve (credit card) or invoiced (requires credit check). Provide a name and payment method. The billing account is created and linked to your Cloud Identity. This is the prerequisite for any paid service usage.
Link a Project to the Billing Account
In the Billing console, select the billing account, then click 'Link projects'. Choose the project(s) to associate. A project can only have one billing account at a time. Once linked, the project can use paid services. You can also change the billing account later, but existing resources may be affected.
Create a Budget
In the Billing console, go to Budgets & alerts > Create budget. Set scope (billing account, project, or filtered by labels). Define amount (fixed or monthly rolling). Set threshold rules: e.g., 50%, 90%, 100% of current spend, and optionally forecasted 100%. Configure notification channels (email, Pub/Sub). Optionally enable 'Disable billing' action for hard stop.
Set Up Budget Alerts
In the budget creation wizard, under 'Manage notifications', choose how to receive alerts: email to billing admins/users, or Pub/Sub topic. You can also add Cloud Monitoring alerting policies. Alerts are sent when actual or forecasted spend crosses the threshold. Note: alerts are not real-time; they are based on cost data updated every 5-6 hours.
Monitor and Respond to Alerts
When an alert fires, you receive an email or Pub/Sub message. For automated response, create a Cloud Function that subscribes to the Pub/Sub topic and takes action (e.g., disable expensive resources, send Slack notification). For manual response, log into the Billing console to view cost breakdowns and adjust resources.
Export Billing Data to BigQuery
In the Billing console, go to Cost Management > Cost Export > BigQuery export. Enable export of detailed cost data and pricing data. Data is exported daily to a BigQuery dataset. You can then run SQL queries to analyze costs by project, service, label, etc. This is essential for enterprise cost management and chargeback.
Enterprise Scenario 1: Multi-Project Cost Control
A large enterprise runs 50+ projects across multiple teams. They use a single billing account for centralized invoicing. To prevent surprise bills, they create budgets at the billing account level with alerts at 50%, 75%, 90%, and 100% of monthly spend. They also create per-project budgets using labels (e.g., label:team=engineering) to track individual team costs. They export billing data to BigQuery and build a custom dashboard in Data Studio. One day, a developer accidentally deploys a high-cost GPU instance, causing spend to spike. The 90% alert fires, and the Cloud Function triggers a Slack notification to the team lead, who shuts down the instance within minutes. Without budgets, the cost would have gone unnoticed until the monthly invoice.
Enterprise Scenario 2: Hard Stop for Sandbox Projects
A company provides sandbox projects for developers to experiment. They want to enforce a strict $100 monthly limit per sandbox project. They create a budget for each sandbox project with a $100 amount and enable the 'Disable billing' action. When a developer exceeds $100, the project's billing is automatically disabled, stopping all paid services. The developer must request a budget increase to continue. This prevents runaway costs. However, they must ensure that the disable action does not affect critical production projects, so they apply budgets only to sandbox projects using project-level scoping.
Performance and Scale Considerations
Budgets can be created at any level (billing account, project, folder, organization). For large organizations, creating budgets per project can be tedious; use labels or folder-level budgets for aggregation.
Billing export to BigQuery scales to terabytes of data. Use partitioning and clustering for efficient queries.
Pub/Sub budget alerts can handle high throughput; ensure your subscriber (e.g., Cloud Function) can process messages quickly.
The cost data delay (5-6 hours) means budget alerts are not suitable for real-time cost control. For near-real-time, use Cloud Monitoring with custom metrics (but this adds complexity).
Common Misconfigurations
Setting a budget but forgetting to configure notification channels — alerts go nowhere.
Enabling 'Disable billing' on a budget that covers production projects — can cause unplanned outages.
Using project-level budgets without labels — cannot aggregate across teams.
Not setting forecasted alerts — surprise end-of-month bills when usage spikes late in the cycle.
What the ACE Tests (Objective 4.2)
The ACE exam expects you to:
Distinguish between self-serve and invoiced billing accounts.
Understand IAM roles: Billing Account Administrator vs. Billing Account User vs. Billing Account Viewer.
Know that budgets do NOT cap spending; they trigger alerts. To stop spending, you must use budget actions (disable billing).
Recognize that budget alerts are based on delayed cost data (up to 5-6 hours).
Know how to set up budget alerts with thresholds (e.g., 50%, 90%, 100%) and notification channels (email, Pub/Sub).
Understand that a project can only be linked to one billing account at a time, but a billing account can be linked to multiple projects.
Know that billing export to BigQuery enables custom cost analysis.
Common Wrong Answers and Traps
Budgets cap spending: Many candidates believe budgets prevent overspending. The exam tests that budgets only alert. The correct answer is that you need to enable 'Disable billing' to stop spending.
Real-time alerts: Candidates often think alerts are immediate. The exam may include a scenario where a sudden spike is detected after hours. The correct answer is that alerts are based on cost data with a delay.
Project can have multiple billing accounts: This is false. A project has exactly one billing account. The exam may present a scenario where you need to split costs across departments; the correct approach is to use separate projects with separate billing accounts or labels.
Billing Account Viewer can link projects: This is false. Only Billing Account User or Project Billing Manager can link projects. Viewer can only view costs.
Specific Numbers and Terms
Budget threshold percentages: 50%, 90%, 100% are common.
Cost data delay: 5-6 hours.
Billing account types: self-serve (credit card) and invoiced (monthly invoice).
IAM role names exactly as above.
Budget scope: billing account, project, folder, organization, or filtered by labels.
Budget actions: 'Disable billing' is the only action that stops spending.
Edge Cases
If you disable billing via budget action, you must manually re-enable billing. The exam may ask: 'What happens when the budget is exceeded?' Answer: The project's billing is disabled; services stop.
If a billing account is suspended due to non-payment, all linked projects are affected. The exam may test that you need to update payment information to restore.
Budgets can be created for a folder or organization if you have resource hierarchy permissions. This allows aggregated budgets.
How to Eliminate Wrong Answers
If an answer says 'budget prevents spending' or 'budget caps costs', it is wrong unless it mentions 'disable billing'.
If an answer says 'real-time alert', it is wrong; look for 'delayed' or 'based on latest cost data'.
If an answer says 'project can have multiple billing accounts', it is wrong.
If an answer confuses IAM roles (e.g., Viewer can link projects), it is wrong.
A billing account aggregates costs across projects and must be linked to a project for paid service usage.
There are two billing account types: self-serve (credit card) and invoiced (monthly invoice).
Budgets do not cap spending; they only trigger alerts based on cost data updated every 5-6 hours.
To automatically stop spending, enable the 'Disable billing' action in a budget.
IAM roles: Billing Account Administrator (full control), Billing Account User (link projects), Billing Account Viewer (view costs).
Billing export to BigQuery enables custom cost analysis with daily updates.
A project can only be linked to one billing account at a time.
Budget thresholds can be set as percentages (e.g., 50%, 90%, 100%) of current or forecasted spend.
Pub/Sub notifications allow automated responses to budget alerts via Cloud Functions.
Forecasted alerts predict end-of-month spend based on current usage patterns.
These come up on the exam all the time. Here's how to tell them apart.
Self-Serve Billing Account
Uses credit/debit card for automatic monthly charges.
No credit check required.
Suitable for small to medium businesses.
Automatic payment; no manual invoice processing.
Can be upgraded to invoiced later.
Invoiced Billing Account
Receives monthly invoice with payment terms (e.g., net 30).
Requires credit check and approval.
Suitable for large enterprises with high spending.
Manual payment via wire transfer or check.
Often includes dedicated support and custom pricing.
Mistake
Budgets automatically stop spending when exceeded.
Correct
Budgets only send alerts. To stop spending, you must enable the 'Disable billing' action in the budget settings, which removes the billing account from the project.
Mistake
Budget alerts are real-time and trigger immediately when spending exceeds a threshold.
Correct
Cost data is updated every 5-6 hours, so alerts are delayed. You cannot get real-time budget alerts.
Mistake
A project can be linked to multiple billing accounts to split costs.
Correct
A project can only be linked to one billing account at a time. To split costs, use separate projects with different billing accounts or use labels and billing export.
Mistake
Billing Account Viewer can link projects to the billing account.
Correct
Billing Account Viewer can only view costs. Billing Account User or Project Billing Manager can link projects.
Mistake
If a billing account is suspended, only new projects are affected.
Correct
All projects linked to a suspended billing account lose access to paid services. Existing resources may be stopped or deleted depending on the service.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
A billing account is a financial entity that collects charges from projects. A project is a container for resources. Each project must be linked to a billing account to use paid services. The billing account is separate from the project and can serve multiple projects.
Create a budget with the 'Disable billing' action enabled. When the budget is exceeded, the billing account is removed from the project, stopping all paid services. Note that this is a hard stop and you must manually re-enable billing to restore services.
No. Budget alerts are based on cost data that is updated every 5-6 hours. For near-real-time monitoring, you can use Cloud Monitoring with custom metrics, but this requires additional setup and may not reflect exact costs.
You need the Billing Account User role on the billing account, or the Project Billing Manager role on the project. The Billing Account Viewer role only allows viewing costs, not linking.
No. A project can only be linked to one billing account at a time. To split costs, use separate projects with different billing accounts, or use labels and billing export to allocate costs.
In the Cloud Console, go to Billing > Cost Management > Cost Export > BigQuery export. Enable the export for detailed cost data and pricing data. Data is exported daily to a BigQuery dataset you specify.
All projects linked to the suspended billing account lose access to paid services. You must update your payment information or contact support to restore the account.
You've just covered GCP Billing Accounts, Budgets, and Alerts — now see how well it sticks with free ACE practice questions. Full explanations included, no account needed.
Done with this chapter?