Connecting a GCP account

This guide covers integrating Google Cloud Platform accounts.

Welcome to the GCP integration guide! In this guide, we will provide steps and requirements to connecting your Google Cloud account for a savings test.

Step 1: Prepare the GCP CLI Environment

  1. Navigate to Integrations and select GCP.
  2. Click the Connect button.
  3. Review the Summary, which explains that Usage AI integrates with your account by providing read access to BigQuery Billing Datasets using a dedicated GCP Service Account.
  4. Prerequisite:
    • Ensure the GCP CLI environment is set up by following the provided instructions.
    • You must have the Organization Administrator Role to assign the required permissions at the organization level.
  5. Select Product(s):
    • Ensure Insured Commitments is selected to grant read and write permissions for GCP reservations and savings plans.
    • You can modify this selection if needed.
  6. Click Next to proceed.

Step 2: Assign a GCP Custom Role

  1. Enter Your GCP Organization ID
    • Locate your GCP Organization ID here.
    • Enter the ID in the field labeled "Enter GCP Organization ID".
  2. Assign Organization-Level Role to Usage AI
    • Open the GCP CLI Console.
    • Copy the provided GCP Permission script from the Usage AI dashboard.
    • Paste the script into the GCP CLI Console and execute it to create an organization-level role for Usage AI.
  3. Verify Role Assignment
    • After executing the command, return to the Usage AI dashboard.
    • Click "Verify Role" to confirm the role assignment.
  4. Proceed to the Next Step
    • Once the verification is successful, click Next to continue.

Step 3: Export Billing Data to BigQuery and Add Permissions

  1. Export Billing Data to BigQuery (Prerequisite)
    • If you haven’t initiated billing data export to BigQuery, follow the instructions outlined here.
  2. Add IAM Permissions
    • Open the IAM Console.
    • Select the project hosting the BigQuery dataset with Cloud Billing export data.
    • Click "+ GRANT ACCESS" under the project’s permissions.
    • Under Add Principals, enter the Usage AI GCP Service Account
      usage-gcp-copilot-prod@copilot-426420.iam.gserviceaccount.com
    • Attach the UsageAI Support Role and save the permissions.
  3. Add BigQuery Permissions
    • Navigate to BigQuery and select the project configured for billing data.
    • In the Explorer Panel, select the project.
    • Click the three vertical dots next to the dataset name and select Share.
    • Click "+ ADD PRINCIPAL".
    • Add the Usage AI GCP Service Account as a new principal.
    • Attach the UsageAI Support Role and save the permission.
  4. Enter Dataset Details
    • Project ID Hosting BigQuery Dataset: Enter your GCP project ID (e.g., myproject-1234).
    • BigQuery Dataset Name: Enter the dataset name (e.g., my_dataset).
    • Table Name: Confirm or update the table name as provided (e.g., gcp_billing_export_resource_v1_016184_0EFD51_601B4C).
  5. Proceed to the Next Step
    • Click Next to continue.

Step 4: Select GCP Projects to Onboard

  1. Review Available Projects
    • In the Usage AI dashboard, you'll see a list of your GCP projects along with their corresponding Billing Accounts.
  2. Select Projects for Onboarding
    • Check the boxes next to the GCP projects you want to onboard with Usage AI.
    • Ensure you’ve selected all relevant projects to optimize their cloud usage and billing.
Complete the Integration
  1. After selecting the desired projects, click "Complete Integration" to finalize the setup.