# Create a Cloud Cost Management account for GCP

GCP

GCP exports billing data in a BigQuery table once the user enables this functionality. If billing export is not already configured for your project, you can go on GCP console and look for billing accounts page, then click on billing export in the menu.

Then configure a Detailed usage cost export as described in Set up Cloud Billing data export to BigQuery (opens new window) CCM GCP export

Find detailed instructions on doing this in Cloud Billing documentation (opens new window).

Important

Cloud Cost Management uses the detailed usage cost data to provide a more accurate analysis of the costs. Please make sure that this option is enabled.

Detailed usage cost enabled

The first step in creating the Cloud Cost Management account is to provide a GCP credential. You can either select an existing one or create a new one.

Next, we need the billing export configuration to retrieve cost data. Project ID and Billing Dataset refer to the project and dataset set up to hold your billing data. Billing Table is the detailed usage cost table name.

Create a GCP account

TIP

The detailed usage cost table is named gcp_billing_export_resource_v1_<BILLING_ACCOUNT_ID>

# Permissions and credentials

GCP has a fine-grained set of permissions (roles (opens new window)) that can be assigned to a credential.

If you need to enable billing data export, you must at least have the roles:

  • roles/billing.costsManager or roles/billing.admin on the target Cloud billing account
  • roles/bigquery.user for the project that contains the BigQuery dataset configured for storing the cost data.

You can visit the related documentation (opens new window) for more information.

Also, in order for a credential to be suitable for use with CCM, it must have the following roles assigned:

  • roles/billing.viewer for finding the configured GCP project
  • roles/bigquery.dataViewer for accessing the cost data