Skip to main content

Connect GCP

Summary

Connect Google Cloud Platform billing exports and resource metadata to Costimizer.

Required role: Organization Manager or Manage Cloud Credentials
Estimated time: 20 minutes

Connection options

Costimizer supports Project-level and Tenant-level connections for GCP:

  • Project — onboard individual GCP projects
  • Tenant — onboard multiple projects using a single service account

Navigate to Accounts → Connect Cloud Account → GCP.

Enable Cloud Billing Export to BigQuery

GCP billing data must be exported to BigQuery before Costimizer can read it.

  1. Go to GCP Console → Billing.
  2. Select your active Billing Account.
  3. Navigate to Billing export → BigQuery export.
  4. Enable Detailed usage cost export.
  5. Select or create a BigQuery dataset.

Note the following (required later):

  • BigQuery Dataset Name
  • Billing Export Table Name
  • Project ID where the BigQuery dataset exists

Create a custom IAM role

Create a custom role in GCP IAM with the following permissions:

bigquery.jobs.create, bigquery.tables.getData, compute.addresses.list, compute.addresses.setLabels,
compute.disks.list, compute.disks.setLabels, compute.firewalls.list, compute.globalAddresses.list,
compute.globalAddresses.setLabels, compute.instances.list, compute.instances.setLabels,
compute.images.list, compute.images.setLabels, compute.machineTypes.get, compute.machineTypes.list,
compute.networks.list, compute.regions.list, compute.snapshots.list, compute.snapshots.setLabels,
compute.zones.list, iam.serviceAccounts.list, monitoring.timeSeries.list,
storage.buckets.get, storage.buckets.getIamPolicy, storage.buckets.list, storage.buckets.update

Create role steps:

  1. Go to IAM & Admin → Roles → Create Role.
  2. Name: costimizer_connection_role.
  3. Add all permissions listed above.
  4. Click Create.

Create a service account and JSON key

  1. Go to IAM & Admin → Service Accounts → Create Service Account.
  2. Name: costimizer-sa.
  3. Assign the custom role created above.
  4. Click Done.

Generate the key:

  1. Open the service account → Keys → Add Key → Create new key → JSON.
  2. Download the JSON file and store it securely.

This JSON file is required when connecting to GCP in Costimizer.

Connect in Costimizer UI

  1. Log in to Costimizer → Accounts → Connect Cloud Account → GCP.
  2. Select Project.
  3. Fill in:
    • Name — a label (e.g., GCP Analytics Project)
    • Upload Service Account JSON file
    • Billing dataset name
    • Billing table name
    • Toggle Automatically detect pricing data if preferred
  4. Click Connect.

Troubleshooting

SymptomFix
BigQuery access deniedVerify dataset location and IAM bindings on the export dataset
Stale dataBilling exports update once daily; allow 24 hours for first sync

See Connection failures for more detail.