Skip to content
Browse the documentation

Connect your providers

Connect Google Cloud

Read Google Cloud spend, Gemini and Vertex AI included, from the billing account's detailed export to BigQuery, and make labels explain who spent it.

CostReveal reads Google Cloud spend from your billing account's detailed usage cost export to BigQuery, in your own project. Nothing is installed in your workloads, no key is exchanged, and CostReveal can read that dataset and nothing else.

What you need

  • The Billing Account Administrator or Billing Account Costs Manager role on the billing account, to turn on the export.
  • A project linked to that billing account, holding the BigQuery dataset the export writes to, and permission to grant roles in it.
  • An owner or admin role in CostReveal.

Connect

  1. In the Google Cloud console, open Billing, Billing export, and under BigQuery export turn on Detailed usage cost into a dataset. A dataset in the US or EU multi-region also brings in the previous month; its first data can take a few hours, and the backfill up to five days.
  2. In CostReveal, go to Connections and choose Connect Google Cloud. It shows CostReveal's service account, and the two grants to give it, filled in as you type the project and dataset:
    • BigQuery Data Viewer on the dataset, so it can read the export;
    • BigQuery Job User on the dataset's project, so its queries run, and are billed, where your data is.
  3. Enter the billing account ID, the project, the dataset and its location, and choose Verify and connect. CostReveal queries the export before saving anything, and points at the field to fix if it cannot.

Optionally, let CostReveal read Recommender's cost recommendations for Insights: in the Google Cloud console, export recommendations to BigQuery into the same dataset. The export is set up once for the organization, by someone with the recommender.resources.export permission there, and needs no further access for CostReveal. CostReveal reads the newest day once a day, for the projects the billing account pays for and the account itself.

Google appends to the export through the day, and some usage takes more than a day to arrive. CostReveal reads it every four hours. The first read brings in the current invoice month and the twelve before it, as far as the export holds them. Where the export holds no older months, Connections says how far back it reached, and each read asks again.

To stop, take back the two grants in Google Cloud at any time. CostReveal then keeps every figure already read and tells you new data has stopped.

How spend is explained

  • Service comes from Google, so it is DIRECT. Each line also keeps its SKU, region and resource.
  • Team, feature and customer come from labels, read with the project's tag keys, as tags are for AWS: first the resource's own labels, then its project's labels for the keys the resource does not carry.
  • Gemini and Vertex AI. Gemini calls on Vertex AI can carry labels on each request, which Google passes into the bill. Label calls with the customer or feature they are for, and that spend is explained by them straight from the invoice. Google's export names models only in SKU descriptions, so Google Cloud spend has no model in CostReveal, and usage data does not divide it.

Spend that no label names is shown as unknown, never spread across teams.

How figures are checked

  • Every amount is summed exactly, as Google's own invoice query does, never as a floating point number.
  • The invoice month is the period, as on Google's invoice. Late usage that Google bills in the next month is filed there, under the day it happened.
  • Credits, such as sustained use and committed use discounts, promotions and free tier, are their own lines, by kind, so gross and net spend both show. Tax and adjustments are kept as Google reports them.
  • Each month's lines must add up to the export's own total for the invoice month, read separately across the whole table. Until the month ends a difference is pending; after that it is flagged.
  • CostReveal first reads a small summary of each month and reads it in detail only when Google has appended to it since, and then only the days the month's rows lie in, so its queries stay small.

Removing the connection

Removing the connection under Connections deletes every figure it brought in from the project, and its archived reports are deleted within a day. Take back the service account's access to the dataset and project in Google Cloud too.