Connecting GCP Cloud Billing

Step-by-step guide on how to export GCP Cloud Billing data

Use the guide below to easily configure GCP Cloud Billing integration.

GCP Setup

Prerequisites

  • GCP project with billing export enabled

  • BigQuery dataset with billing export data

  • Service account with the relevant permissions

  • Configured AWS Workload Identity Federation

Required permissions

  • BigQuery Data Viewer on the billing export dataset

  • BigQuery Job User permission

  • Service Account Token Creator (for impersonation)

Variables

These variables will be used in the next steps to complete your GCP Billing profile setup.

gcp_project_id=your-project-id
gcp_billing_account=your-billing-account
gcp_service_account=your-service-account@project.iam.gserviceaccount.com

Configuring GCP access

Follow these steps to grant PerfectScale the required permissions.

  1. Create Service Account

  2. Assign the roles required to enable BigQuery access:

    • BigQuery Data Viewer

    • BigQuery Job User

  3. On the tab Principals with access, grant permissions to the principal perfectscale-gcp-cur-accessor@psc-dev-1-000001.iam.gserviceaccount.com with the role Service Account Token Creator.

Principals with access

The customer should provide their Service Account email (e.g., [email protected]). This account will be used by PerfectScale to access the necessary billing and usage data.

GCP Billing profile

Once everything above is in place, the next step is to create a GCP Billing profile and connect it to the cluster(s) you need.

🛠️ How to create GCP Billing profile

There are two options for creating a Profile: from the Settings tab or directly from the Overview.

GCP Billing profile from the settings

Go to the Settings tab on the left panel -> select Pricing -> click the +Add Profile button -> select GCP Billing -> name the profile and put the needed values in the relevant fields -> click Save button.

From the Overview tab

Go to the Overview tab on the left panel -> find the cluster to which you want to apply the Azure Profile and click gear button -> go to Customizations -> click on Add New Profile in the Pricing Profile drop-down list -> select GCP Billing type -> name and configure your profile -> click the Save And Apply button -> click the Save Changes button.

GCP Billing profile from the overview

GCP Billing profile configuration

GCP Billing profile configuration

gcp_project_id: The unique identifier for your GCP project used to interact with it across services and APIs.

gcp_billing_account: The unique identifier for your GCP billing account to manage billing across projects.

gcp_service_account:The service account key used to authenticate and securely interact with Google Cloud APIs on your behalf.

Profile configuration verification

To verify if the profile is configured properly, click the Test Integration button.

🟢 When the configuration is correct, you will see the message GCP Billing configured correctly.

🔴 In case of GCP Billing configured wrongly response, check the Show integration failure details dropdown and fix the displayed issue(s).

🛠️ How to apply GCP Billing profile

Apply to a single cluster

To apply GCP Billing profile to the cluster, go to the Overview tab on the left-hand panel -> find the cluster to which you want to apply the GCP Billing Profile and click gear dots button -> go to Customizations -> select the needed profile in the Pricing Profile drop-down list.

Applying GCP Billing profile to a single cluster

Apply to multiple clusters

To apply the profile to multiple clusters from a single view, use the Manage Assignments feature.

Go to the Settings tab on the left-hand panel -> select the Pricing -> click the Manage Assignments button -> apply the profile for the needed clusters -> click the Save Changes button.

Applying GCP Billing profile to multiple clusters

Last updated