GCP Associate Cloud Engineer Practice Question 2: Billing Budget Alerts
Google Cloud Associate Cloud Engineer · Test 1 · question 2 of 10
The finance team at your company wants to be emailed whenever the spend on the dev Cloud Billing account reaches 50%, 90%, and 100% of a $10,000 monthly target. They also want an automated hook so that engineering can later react to the alert programmatically.
What should you configure?
Show answer and explanation
Answer:
A Cloud Billing budget is the purpose-built feature here. A budget can be scoped to a whole billing account (or filtered to projects, services, or labels), it takes a specified amount, and its threshold rules fire email alerts to the billing account's Billing Account Administrators and Billing Account Users at each configured percentage of actual or forecasted spend. Attaching a Pub/Sub topic to the same budget publishes a message on every budget update, which is the supported way to drive programmatic reactions later.
Option A confuses quotas with cost control. Quotas limit units of a resource (API requests, CPUs per region) not currency, and there is no quota that caps a billing account at a dollar amount.
Option C is not workable as written: billing cost is not exposed as a Cloud Monitoring metric you can alert on directly. Cost data reaches BigQuery through billing export, and budgets are the alerting mechanism.
Option D would eventually surface the numbers, but billing export to BigQuery is delayed and requires you to build and maintain the alerting logic yourself. It duplicates what budgets already provide out of the box.
Note that a standard alerts-only budget does not cap spending; it only notifies. Stopping spend requires an explicit automation, such as a Cloud Run function subscribed to the budget's Pub/Sub topic that disables billing on the project.
Reference: Create, edit, or delete budgets and budget alerts