Question

Difficulty: HardCreating Billing Budgets, Alerts, and BigQuery Exports

A cloud engineering team needs to implement financial governance for a new Google Cloud enterprise landing zone. They have two primary objectives: first, export detailed daily resource-level billing data to a central BigQuery dataset for custom SQL analysis; second, enable programmatic event-driven remediation whenever a specific billing budget threshold is exceeded. Which TWO steps must be performed to meet these operational requirements?

  1. Configure the Cloud Billing budget to publish programmatic notifications to a Cloud Pub/Sub topic, which triggers a Cloud Function or Cloud Run service to handle automated remediation.Answer
  2. Grant the engineer configuring the BigQuery billing export the Billing Account Costs Manager (or Billing Account Administrator) role on the Cloud Billing account and BigQuery Data Editor on the destination dataset.Answer
  3. C
    Grant the administrator the Project Owner role on the target BigQuery project to automatically grant permission to create Cloud Billing exports for the billing account.
  4. D
    Set the budget alert threshold rule to capped mode so that Google Cloud automatically shuts down running Compute Engine VM instances upon hitting 100% of the budget.

Answer

To achieve both objectives, the team must configure the Cloud Billing budget to send programmatic notifications to a Cloud Pub/Sub topic (which feeds downstream serverless remediation) and grant the user setting up BigQuery export the required Billing Account roles alongside BigQuery Data Editor permissions.
The solution requires configuring programmatic notifications from the billing budget to a Pub/Sub topic to enable automated resource actions, and ensuring the engineer possesses the necessary permissions on both the billing account (Billing Account Costs Manager or Administrator) and the destination BigQuery dataset (BigQuery Data Editor).

Step-by-Step Solution

1
Configure programmatic budget alerting via Cloud Pub/Sub.
Budget threshold events publish messages to a designated Pub/Sub topic rather than relying on email notifications alone.
Google Cloud billing budgets only notify; automated resource shutdown requires Pub/Sub messages to trigger custom remediation logic.
2
Ensure correct IAM roles across both Billing Account and BigQuery project scopes.
The user gains permission to stream cost metrics from the billing account into the BigQuery dataset.
Creating a BigQuery billing export requires permissions spanning two separate resource scopes: the Cloud Billing account (Billing Account Costs Manager / Administrator) and the destination BigQuery dataset (BigQuery Data Editor).

Key Concept

Configuring Cloud Billing Budgets, Pub/Sub programmatic alerts, and BigQuery Export IAM requirements.
Rate this question