Skip to main content

GCP Billing Enrichment

To enrich the inventory with GCP’s pricing information, the cloud billing data must be exported to BigQuery and access permission must be granted to the OpsHelm service account.

Enabling Cloud Billing Export

The most current and in-depth guide to exporting your Cloud Billing data to BigQuery can be found in the GCP documentation. The billing information that OpsHelm uses is “Detailed usage cost”.

Prerequisites: You will need the Billing Account Costs Manager or Billing Account Administrator role to edit billing export settings.

  1. Create a project that will contain all of your organization’s billing information. This project will need to be linked to the Cloud Billing account that we are exporting from
  2. Navigate to the Billing page in the console
  3. Navigate to the Billing Export tab
  4. Select “Edit Settings” under “Detailed usage cost”
  5. Select an existing BigQuery Dataset to export your billing information to, or follow the prompts to create a new one Billing export page showing configuration options

Grant OpsHelm Service Role permission to export from BigQuery Dataset

OpsHelm’s service role requires permissions to export billing information from BigQuery to an OpsHelm-owned storage bucket. The permissions required are described in the GCP documentation.

  1. Find your OpsHelm service account principal name
    1. Navigate to the IAM page for the project being monitored by OpsHelm
    2. Locate the principal with the name “Opshelm Service Account”
  2. Grant the following permissions to the OpsHelm service account.
    • bigquery.tables.export (included in the role BigQuery Data Viewer)
    • bigquery.jobs.create (included in the role BigQuery Job User)