Set Up Cloud Cost Management for GCP

Updated 4 weeks ago by Archana Singh

Harness Cloud Cost Management (CCM) monitors the cloud costs of your GCP products, projects, SKUs, and location. As a first step, you connect Harness to your GCP account to get insights into your cloud infrastructure and GCP services, Compute Engine Cloud Storage, BigQuery, etc. CCM displays the data for your connected GCP services for further analysis.

After enabling CCM, it takes about 24 hours for the data to be available for viewing and analysis.

In this topic:

Before You Begin

  • Review Required permissions and roles to create an IAM role at the organization level
  • Ensure that you have the following permissions to enable and configure the export of Google Cloud billing data to a BigQuery dataset:

Connect Harness to Google Cloud Platform (GCP) Account

Connect Harness to your GCP account to get insights into your cloud infrastructure and GCP services, Compute Engine Cloud Storage, BigQuery, etc. This involves the following steps:

Step 1: Overview

  1. In Account Setup, in Account Resources, click Connectors.
  2. In Connectors, click + Connector.
  3. In Cloud Costs, click GCP.
  4. In Overview, in Connector Name, enter a name that describes this account.
  5. In Specify Project ID, enter the project ID and click Continue. For more information on how to get a project ID, see Create a BigQuery dataset.

Step 2: GCP Billing Export

Cloud Billing export to BigQuery enables you to export detailed Google Cloud billing data (such as usage and cost estimate data) automatically throughout the day to a BigQuery dataset that you specify.

  1. In GCP Billing Export, click Launch GCP console.
  2. In the GCP Explorer window, in the pinned projects section, click your project ID to open the project. If you see an overflow menu (:) next to your project ID, click the menu and select Open.
  3. Click Create dataset. For more information, see Create a BigQuery dataset.
  4. Enter a Dataset ID.
    You need to enter Dataset ID in Harness.
  5. Select a Data location.
  6. Set the Default table expiration to Never.
  7. Set the Encryption option to Google-managed key.
  8. To save, click CREATE DATASET.
  9. Enter the Dataset ID in Harness and click Continue. When you are done it will look something like this:

Step 3: Grant Permissions

Cloud Billing Export to BigQuery helps you export detailed Google Cloud billing data (such as usage and cost estimate data) to a BigQuery dataset that you specify. The export happens throughout the day automatically. 

  1. In Grant permissions, click Open BigQuery Page.
  2. Log into the GCP console and go to the BigQuery page.
  3. Select your project in the left panel.
  4. Select your dataset. For more information on creating a dataset, see Creating datasets.
  5. Click SHARE DATASET.
  6. In Dataset permissions, in Add members, enter the Harness service account as a member.

    Copy the service account detail from Harness. The service account is generated dynamically for your account.
  7. In Select a role, select BigQuery Data Viewer, and then click Add.
  8. Click Done.

    When you are done, it will look something like this:
  9. Click Continue in Harness.

Step 4: Test Connection

The validation and verification happen in this step. Once the validation and verification are completed, click Finish.

Your connector is now listed in the Connectors.

Next Steps


Please Provide Feedback