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
- Navigate to Integrations and select GCP.
- Click the Connect button.
- 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.
- 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.
- 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.
- Click Next to proceed.
Step 2: Assign a GCP Custom Role
- Enter Your GCP Organization ID
- Locate your GCP Organization ID here.
- Enter the ID in the field labeled "Enter GCP Organization ID".
- 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.
- Verify Role Assignment
- After executing the command, return to the Usage AI dashboard.
- Click "Verify Role" to confirm the role assignment.
- Proceed to the Next Step
- Once the verification is successful, click Next to continue.
Step 3: Export Billing Data to BigQuery and Add Permissions
- Export Billing Data to BigQuery (Prerequisite)
- If you haven’t initiated billing data export to BigQuery, follow the instructions outlined here.
- 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.
- 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.
- 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
).
- Project ID Hosting BigQuery Dataset: Enter your GCP project ID (e.g.,
- Proceed to the Next Step
- Click Next to continue.
Step 4: Select GCP Projects to Onboard
- Review Available Projects
- In the Usage AI dashboard, you'll see a list of your GCP projects along with their corresponding Billing Accounts.
- 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
- After selecting the desired projects, click "Complete Integration" to finalize the setup.