A cloud engineer needs to configure automated cost-control actions triggered by Cloud Billing budget alerts using a serverless event architecture. Arrange the following deployment steps in the correct chronological order required to set up this workflow.
- 1Grant the cloud engineer the Billing Account Administrator or Billing Account Costs Manager IAM role on the Cloud Billing account.
- 2Create a Cloud Pub/Sub topic in a dedicated management project to act as the message destination for budget notification payloads.
- 3Configure the Cloud Billing budget with specified threshold rules and attach it to the created Cloud Pub/Sub topic.
- 4Deploy a Cloud Function subscribed to the Cloud Pub/Sub topic with code logic that parses budget alert JSON payloads and executes resource-capping API calls.
Answer
The correct sequence starts with granting the appropriate IAM permissions on the Cloud Billing account, followed by creating the destination Cloud Pub/Sub topic, configuring the Cloud Billing budget linked to that Pub/Sub topic, and finally deploying the Cloud Function subscriber to handle automated remediation logic.
The correct order establishes prerequisite security permissions first, provisions the messaging infrastructure second, binds the billing budget alert policy to the Pub/Sub endpoint third, and implements the serverless consumer logic fourth. This sequence ensures all dependency relationships (permissions -> Pub/Sub topic -> budget binding -> event consumer) are satisfied without workflow errors.
Step-by-Step Solution
Key Concept
Programmatic Billing Budget Notifications and Automated Remediation Workflow