A Cloud Engineer needs to establish automated cost controls by configuring a Cloud Billing budget to publish programmatic threshold notifications to a Cloud Pub/Sub topic. What is the correct sequence of steps to perform this configuration?
- 1Create a Cloud Pub/Sub topic in the Google Cloud project assigned to handle billing automation.
- 2Grant the Pub/Sub Publisher IAM role (roles/pubsub.publisher) on the topic to the Cloud Billing service account.
- 3Navigate to the Cloud Billing console and select Budgets & alerts for the target billing account.
- 4Create a new budget, specify the scope and target amount, and define the percentage cost threshold rules.
- 5Under Actions in the budget setup, enable programmatic notifications and select the created Pub/Sub topic.
Cevap
The correct sequence of steps is: 1) Create the Cloud Pub/Sub topic, 2) Grant the Pub/Sub Publisher role to the Cloud Billing service account, 3) Open Budgets & alerts in the Cloud Billing console, 4) Configure the budget scope, target amount, and threshold rules, and 5) Enable programmatic notifications and select the Pub/Sub topic under budget Actions.
Configuring programmatic billing notifications requires establishing the messaging infrastructure before linking it to budget rules. First, the Cloud Pub/Sub topic must be created. Next, the Cloud Billing service account must be granted `roles/pubsub.publisher` access so it has permission to publish messages. Once infrastructure authorization is ready, the engineer opens the Budgets & alerts interface in Cloud Billing, defines the budget limits and threshold rules, and finally connects the budget to the target Pub/Sub topic under Actions.
Adım Adım Çözüm
Anahtar Kavram
Programmatic Cloud Billing budget notifications with Cloud Pub/Sub integration