Soru

Zorluk: OrtaCreating Billing Budgets, Alerts, and BigQuery Exports

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?

  1. 1Create a Cloud Pub/Sub topic in the Google Cloud project assigned to handle billing automation.
  2. 2Grant the Pub/Sub Publisher IAM role (roles/pubsub.publisher) on the topic to the Cloud Billing service account.
  3. 3Navigate to the Cloud Billing console and select Budgets & alerts for the target billing account.
  4. 4Create a new budget, specify the scope and target amount, and define the percentage cost threshold rules.
  5. 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

1
Provision the Pub/Sub notification endpoint.
A Cloud Pub/Sub topic is established in the project.
Creating the Pub/Sub topic first ensures that a valid target resource exists before configuring access policies or budget actions.
2
Authorize the Cloud Billing backend service.
The Cloud Billing service account is assigned the Pub/Sub Publisher role on the newly created topic.
Without explicit publisher permissions on the target topic, Cloud Billing cannot deliver automated notification messages when thresholds are reached.
3
Open billing management tools.
The engineer accesses the Budgets & alerts section within Cloud Billing.
This console location provides the controls required to create and manage billing budget alerting rules.
4
Define budget targets and alert triggers.
Budget scope, spending limit, and percentage thresholds (e.g., 50%, 90%, 100%) are set up.
Establishing threshold rules specifies the exact spending conditions under which notification events will fire.
5
Connect the budget to the programmatic Pub/Sub endpoint.
The budget is linked to the Pub/Sub topic under the Actions configuration panel.
This final binding enables programmatic notification messages to be published to the topic upon threshold breaches.

Anahtar Kavram

Programmatic Cloud Billing budget notifications with Cloud Pub/Sub integration
Bu soruyu puanla