Medium1 markMultiple Choice
Domain 1.2: Managing billing configurationBillingBudgetsPub/SubCloud Functions

GCP ACE · Question 04 · Domain 1.2: Managing billing configuration

Your startup has a strict monthly cloud budget of $500. You want to be notified immediately if your spending exceeds 50%, 90%, and 100% of this budget. You also want to ensure that if the budget is exceeded, no further costs are incurred, even if it means shutting down resources.

How should you configure this?

Answer options:

A.

Create a budget with alerts at 50%, 90%, and 100%. Check the 'Hard Cap' box in the billing console to automatically shut down resources at 100%.

B.

Create a budget with alerts at 50%, 90%, and 100%. Configure the budget to send notifications to a Pub/Sub topic. Create a Cloud Function triggered by this topic to disable billing on the project.

C.

Set up a billing export to BigQuery. Write a scheduled query that runs every hour to check the cost. If the cost exceeds $500, use a stored procedure to delete the project.

D.

Create a budget with alerts at 50%, 90%, and 100%. Assign the Billing Account Administrator role to the project owner so they can manually stop instances when they receive the email.

How to approach this question

Recognize that GCP budgets do not stop spending automatically. You must use programmatic billing controls (Pub/Sub + Cloud Functions) to cap costs.

Full Answer

B.Create a budget with alerts at 50%, 90%, and 100%. Configure the budget to send notifications to a Pub/Sub topic. Create a Cloud Function triggered by this topic to disable billing on the project.✓ Correct
By default, Google Cloud budgets only trigger email alerts; they do not automatically stop resources or prevent spending. To enforce a hard cap, you must configure the budget to send programmatic notifications to a Cloud Pub/Sub topic. You can then write a Cloud Function that listens to this topic and uses the Cloud Billing API to disable billing for the project when the 100% threshold is reached. Disabling billing causes all billable services to stop.

Common mistakes

Assuming GCP has a simple 'hard cap' toggle switch for budgets.

Practice the full GCP Associate Cloud Engineer Practice Exam 6

50 questions · hints · full answers · grading

More questions from this exam