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.
- Go to GCP Console → Billing.
- Select your active Billing Account.
- Navigate to Billing export → BigQuery export.
- Enable Detailed usage cost export.
- 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:
- Go to IAM & Admin → Roles → Create Role.
- Name:
costimizer_connection_role. - Add all permissions listed above.
- Click Create.
Create a service account and JSON key
- Go to IAM & Admin → Service Accounts → Create Service Account.
- Name:
costimizer-sa. - Assign the custom role created above.
- Click Done.
Generate the key:
- Open the service account → Keys → Add Key → Create new key → JSON.
- Download the JSON file and store it securely.
This JSON file is required when connecting to GCP in Costimizer.
Connect in Costimizer UI
- Project
- Tenant
- Log in to Costimizer → Accounts → Connect Cloud Account → GCP.
- Select Project.
- 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
- Name — a label (e.g.,
- Click Connect.
Use Tenant when you want to onboard multiple GCP projects under one service account.
Ensure the custom IAM role is assigned to the service account on each project first, then select Tenant in Costimizer and upload the same JSON file.
Troubleshooting
| Symptom | Fix |
|---|---|
| BigQuery access denied | Verify dataset location and IAM bindings on the export dataset |
| Stale data | Billing exports update once daily; allow 24 hours for first sync |
See Connection failures for more detail.