Question

Difficulty: HardCreating Billing Budgets, Alerts, and BigQuery Exports

A cloud operations team needs to enforce automated governance by deploying a serverless remediation pipeline that triggers whenever a GCP billing account exceeds defined financial thresholds. In what order should the engineer execute the configuration steps to establish this automated budget notification and remediation workflow?

  1. 1Create a dedicated Cloud Pub/Sub topic in the central governance project to serve as the notification bus for financial alerts.
  2. 2Grant the Cloud Billing Service Agent the Pub/Sub Publisher (roles/pubsub.publisher) IAM role on the newly created Pub/Sub topic.
  3. 3Deploy the serverless consumer workload (such as Cloud Functions or Cloud Run) and subscribe it to the Pub/Sub topic to execute capping/remediation logic.
  4. 4Create the Cloud Billing budget, specify cost metrics and threshold percentages, and attach the Cloud Pub/Sub topic under programmatic notification channels.

Answer

The correct sequence starts with creating the Cloud Pub/Sub topic, granting the Cloud Billing Service Agent the Pub/Sub Publisher role on that topic, deploying the serverless remediation workload subscribed to the topic, and finally creating the Cloud Billing budget with the Pub/Sub programmatic notification channel attached.
To build a functional automated remediation pipeline, infrastructure dependencies must be established in order: first create the message queue (Cloud Pub/Sub topic), second grant the Cloud Billing service identity permission to publish to that queue, third deploy the consumer service that executes remediation actions upon receiving messages, and finally define the budget with the Pub/Sub notification channel connected.

Step-by-Step Solution

1
Establish the event bus infrastructure
A Cloud Pub/Sub topic is available to ingest programmatic alert payloads.
Downstream IAM policies and budget channel bindings require a valid target Pub/Sub topic resource.
2
Configure publisher IAM permissions for Cloud Billing
The Cloud Billing system identity receives permissions to publish messages to the Pub/Sub topic.
Without `roles/pubsub.publisher` assigned to the Cloud Billing Service Agent on the topic, message publishing will fail silently upon threshold breaches.
3
Deploy and connect the automated remediation subscriber
A Cloud Function or Cloud Run service is active and listening for pub/sub messages.
The automated handler must be listening to handle incoming JSON budget payloads to alter project states or quotas.
4
Configure the Cloud Billing budget and attach the programmatic notification channel
The budget rule is actively monitoring spending and linked to the Pub/Sub message stream.
Attaching the Pub/Sub topic to the budget completes the integration.

Key Concept

Automated Budget Remediation Architecture and Cloud Billing Pub/Sub Integration Sequence
Estimated Time:2m 0s
Rate this question