How the billing structure works in GCP
GCP can be confusing when it comes to billing. To make it a little more clear, you configure your billing export to send the billing data into a project. When you use multiple projects, all billing data will accumulate into one billing account (which exports again to a project → BigQuery).Steps to Connect
Gather required information
Before starting the connection process, make sure you have the following information ready:Required:
- GCP Project ID - The project ID that hosts your BigQuery billing export dataset
- Format:
my-project-id(not the project number) - For Organization scope, Yasu auto-discovers all projects in the organization
- Format:
-
Billing Account ID - Required for accurate cost calculations
- Format:
01ABCD-2EFGH3-456IJK - Found in: GCP Console → Billing
- Example:
029B0D-80B502-B17C09
- Format:
-
BigQuery Billing Export Dataset - Required for detailed cost analysis
- Dataset name where billing export is stored
- Format:
billing_dataorbilling_export_dataset - This is the BigQuery dataset containing your daily cost data
Export billing data to BigQuery
GCP works with BigQuery to update its price logging every few times a day. To set this up, see the following documentation:Or navigate to the Google Cloud Console Billing page and click on Billing export. On this page, you can enable the exporting.
Export Cloud Billing data to BigQuery
Official Google Cloud documentation
Make sure billing export is enabled before proceeding to the next steps, as Yasu requires access to BigQuery billing data.
Grant Yasu service account access
Yasu needs the following read-only roles to gather cost, usage, and resource information. The principle of least privilege applies, so attach only what is required.Service Account Email:
yasu-connector@yasu-437610.iam.gserviceaccount.comGrant Project-Level Permissions
- Go to GCP Console → IAM & Admin → IAM
- Select the project you want to scan
- Click ”+ GRANT ACCESS” (or ”+ ADD”)
- Under “New principals”, add:
- Under “Select a role”, add these roles:
- ✅ Viewer (
roles/viewer) - Basic read access to project resources (covers Compute, Cloud SQL, GKE, and Monitoring read permissions) - ✅ Browser (
roles/browser) - Read access to browse the project hierarchy - ✅ Storage Object Viewer (
roles/storage.objectViewer) - For storage scanning (not included in Viewer) - ✅ BigQuery Data Viewer (
roles/bigquery.dataViewer) - For BigQuery scanning - ✅ BigQuery Job User (
roles/bigquery.jobUser) - For running BigQuery billing queries - ✅ Recommender Viewer (
roles/recommender.viewer) - For GCP recommendations - ✅ Billing Account Viewer (
roles/billing.viewer) - For cost calculations
- ✅ Viewer (
- Click “SAVE”
Organization-Level Permissions (for org scope only)
If you selected Organization scope in Yasu, grant these additional roles at the organization level (not project level):- Go to GCP Console → IAM & Admin → IAM
- Switch to your Organization (top of the page)
- Click ”+ GRANT ACCESS”
- Add
yasu-connector@yasu-437610.iam.gserviceaccount.com - Add the role:
- ✅ Browser (
roles/browser) - Allows Yasu to discover all projects in your organization
- ✅ Browser (
For organization scope, you still need to grant the project-level roles above on each project you want scanned (or use IAM policy inheritance by granting them at the org/folder level).
Grant BigQuery dataset permissions
If you have BigQuery billing export configured, you need to grant dataset-level permissions:
- Go to GCP Console → BigQuery
- Select the project that hosts your billing export dataset
- In the Explorer panel, find your billing dataset
- Click the three dots (⋮) next to the dataset name
- Click “Share dataset”
- Click ”+ ADD PRINCIPAL”
- Under “New principals”, add:
- Under “Select a role”, select:
- ✅ BigQuery Data Viewer (
roles/bigquery.dataViewer)
- ✅ BigQuery Data Viewer (
- Click “ADD”
Verify project requirements
Your projects must meet these requirements before connecting:
- ✅ Projects must be active (not deleted or suspended)
- ✅ Billing must be enabled (for accurate cost calculations)
- ✅ Projects should have resources (empty projects will show 0 results)
Complete connection in Yasu Dashboard
- In Yasu, navigate to Settings → Cloud Accounts → Add GCP Account and click Connect.
- Step 1 — Scope: Select Project (single project) or Organization (all projects in an org). For organization scope, enter your Organization ID.
- Step 2 — Billing: Enter your Billing Account ID and BigQuery Dataset ID (format:
project-id.dataset_name). - Step 3 — Connect: Verify the required roles are granted to Yasu’s service account, then click Connect.
- Service account has the required permissions
- Required APIs are enabled
- BigQuery dataset is accessible
- Billing information is available
Verification Steps
After connecting, Yasu will perform the following checks:-
Service Account Access Validation
- Verifies Yasu’s service account has the expected roles
- Confirms access to your projects
- Verifies the correct JSON key or Workload Identity binding
-
Data Collection
- Begins collecting Billing data from BigQuery
- Starts monitoring Resource metrics
-
Parsing Collected Data
- The collected data will be converted into Yasu’s internal format for cost optimization and recommendation generation
-
Integration Status
- You will see a green checkmark when the connection is successful
- Optimization recommendations will begin appearing after the initial sync (usually within a few minutes)
Common Issues and Quick Fixes
Issue: "API not enabled" Error
Issue: "API not enabled" Error
What it means: An API we need is not enabled in your project.Fix:
- Go to APIs & Services → Library
- Search for the API mentioned in the error
- Click “Enable”
- Wait 1-2 minutes
- Try connecting again in Yasu
Issue: "Permission denied" Error
Issue: "Permission denied" Error
What it means: Yasu’s service account doesn’t have the required permissions.Fix:
- Go to IAM & Admin → IAM
- Find
yasu-connector@yasu-437610.iam.gserviceaccount.com - Make sure it has all the roles listed in Step 3 above
- If missing, add the required role
- Try connecting again
Issue: "BigQuery dataset not accessible"
Issue: "BigQuery dataset not accessible"
What it means: Yasu’s service account can’t access your BigQuery billing dataset.Fix:
- Go to BigQuery → Select your billing dataset
- Click three dots (⋮) → “Share dataset”
- Add
yasu-connector@yasu-437610.iam.gserviceaccount.com - Grant BigQuery Data Viewer role
- Click “ADD”
- Try connecting again
Issue: "No resources found"
Issue: "No resources found"
What it means: Either:
- Your project has no resources (this is normal), OR
- Resources are in a different project
- Verify you provided the correct project ID
- Check if resources exist in the project
- If resources exist but aren’t found, contact support