An organization manages several Google Cloud projects linked to a single central Cloud Billing account. To perform historical spend analysis using SQL, the lead engineer creates a dedicated project named `corp-billing-analytics` intended to host the billing dataset. The engineer needs to configure a detailed daily Cloud Billing export to BigQuery while following the principle of least privilege.
Which configuration strategy correctly enables the Cloud Billing export to the target dataset?
- Enable the BigQuery API in `corp-billing-analytics`, create a dataset in `corp-billing-analytics`, and ensure the configuring user holds both the Billing Account Costs Manager role on the Cloud Billing account and BigQuery Data Editor access on the destination project/dataset.Answer
- BEnable the Cloud Billing API on the organization root node instead of `corp-billing-analytics`, then set up an automated budget threshold rule to automatically disable export generation if project charges exceed $0.
- CGrant the configuring user the Project Owner role on `corp-billing-analytics`, which automatically grants implicit administrative access to link exports across any Cloud Billing account without requiring separate billing account IAM roles.
- DConfigure a Cloud Billing budget alert rule that automatically caps and terminates BigQuery export ingestion whenever total monthly spending exceeds 100% of the defined target budget.
Answer
Enable the BigQuery API in `corp-billing-analytics`, create a dataset in `corp-billing-analytics`, and ensure the configuring user holds both the Billing Account Costs Manager role on the Cloud Billing account and BigQuery Data Editor access on the destination project/dataset.
The correct strategy requires enabling the BigQuery API within the destination project `corp-billing-analytics` and creating a target dataset. Because Cloud Billing export spans both the billing account and the target project, the user setting up the export must hold a billing role (Billing Account Costs Manager or Billing Account Administrator) on the billing account, and dataset write access (BigQuery Data Editor or Admin) in the destination project.
Step-by-Step Solution
Key Concept
Cloud Billing BigQuery Export Requirements and Dual-Boundary IAM Permissions