Chapter 1. Creating a Google Cloud integration: Basic
You must create a Google cloud integration for hybrid committed spend from the Integrations page and configure your Google Cloud account to allow hybrid committed spend access.
If you want to create a GCP integration by using the advanced path, do not complete the following steps. Instead, go to Creating a Google Cloud integration: Advanced.
You must have a Red Hat account user with Cloud Administrator permissions before you can add integrations to hybrid committed spend.
To create a Google Cloud integration, you will complete the following tasks:
- Create a Google Cloud project for your hybrid committed spend data.
- Create a bucket for filtered reports.
- Have a billing service account member with the correct role to export your data to hybrid committed spend.
- Create a BigQuery dataset to contain the cost data.
- Create a billing export that sends the hybrid committed spend data to your BigQuery dataset.
Google Cloud is a third-party product and its console and documentation can change. The instructions for configuring the third-party integrations are correct at the time of publishing. For the most up-to-date information, see the Google Cloud Platform documentation.
1.1. Adding your Google Cloud account as an integration Copy linkLink copied to clipboard!
You can add your Google Cloud account as an integration. After adding a Google Cloud integration, the hybrid committed spend application processes the cost and usage data from your Google Cloud account and makes it viewable.
Prerequisites
- To add data integrations to cost management, you must have a Red Hat account with Cloud Administrator permissions.
Procedure
-
From Red Hat Hybrid Cloud Console, click Settings Menu
> Integrations.
- On the Settings page, in the Cloud tab, click Add integration.
- In the Add a cloud integration wizard, select Google Cloud as the cloud provider type and click Next.
- Enter a name for your integration. Click Next.
- In the Select application step, select Hybrid committed spend and click Next.
1.2. Creating a Google Cloud project Copy linkLink copied to clipboard!
Create a Google Cloud project to gather and send your cost reports to Red Hat.
Prerequisites
-
Access to Google Cloud Console with
resourcemanager.projects.createpermission
Procedure
-
In the Google Cloud Console click
. - Enter a Project name in the new page that appears and select your billing account.
- Select the Organization.
- Enter the parent organization in the Location box.
- Click .
In cost management:
- On the Project page, enter your Project ID.
- To send the default data to Red Hat automatically, select I am OK with sending the default data set to hybrid committed spend.
- Click Next.
1.3. Creating a Google Cloud Identity and Access Management role Copy linkLink copied to clipboard!
A custom Identity and Access Management (IAM) role for hybrid committed spend gives access to specific cost related resources required to enable a Google Cloud Platform integration and prohibits access to other resources.
Prerequisites
Access to Google Cloud Console with these permissions:
-
resourcemanager.projects.get -
resourcemanager.projects.getIamPolicy -
resourcemanager.projects.setIamPolicy
-
- Google Cloud project
Procedure
-
In the Google Cloud Console, click
. - Select the project you created from the menu.
- Click .
-
Enter a Title, Description and ID for the role. In this example, use
customer-data-role. - Click .
Use the Enter property name or value field to search and select the following permissions for your custom role:
-
bigquery.jobs.create -
bigquery.tables.getData -
bigquery.tables.get -
bigquery.tables.list
-
- Click .
- Click .
- In the Add a cloud integration wizard, on the Create IAM role page, click Next.
1.4. Adding a billing service account member to your Google Cloud project Copy linkLink copied to clipboard!
You must create a billing service account member that can export cost reports to Red Hat Hybrid Cloud Console in your project.
Prerequisites
In the Google Cloud Console:
-
Click
. - Select the project you created from the menu.
- Click .
Paste the following principal into the New principals field:
billing-export@red-hat-cost-management.iam.gserviceaccount.com-
In the Assign roles section, assign the IAM role you created in Creating a Google Cloud Identity and Access Management role . In this example, use
customer-data-role. - Click .
In the cost management:
- On the Assign access page, click Next.
Verification steps
-
Navigate to
. - Verify the new member is present with the correct role.
1.5. Creating a Google Cloud BigQuery dataset Copy linkLink copied to clipboard!
Create a BigQuery dataset to collect and store the billing data for hybrid committed spend.
Prerequisites
-
Access to Google Cloud Console with
bigquery.datasets.createpermission - Google Cloud project
Procedure
- In Google Cloud Console, click .
- In the Explorer panel, select the project you created.
- Click the action icon for your project name.
- Click .
-
Enter a name for your dataset in the Dataset ID field. In this example, use
CustomerData. - Click .
- In the Add a cloud integration wizard, on the Create dataset page, enter the name of the dataset you created.
- Click Next.
1.6. Exporting Google Cloud billing data to BigQuery Copy linkLink copied to clipboard!
Enabling a billing export to BigQuery sends your Google Cloud billing data (such as usage, cost estimates, and pricing data) automatically to the BigQuery dataset you created in the last step.
Prerequisites
- Access to Google Cloud Console with the Billing Account Administrator role
- Google Cloud project
- Billing service member with the cost management Identity and Access Management (IAM) role
- BigQuery dataset
Procedure
-
In the Google Cloud Console, click
. - Click the Billing export tab.
- Click in the Detailed usage cost section.
- Select the hybrid committed spend Project and Billing export dataset you created in the dropdown menus.
- Click .
- In the Add a cloud integration wizard, on the Billing export page, click Next.
- On the Review details page, review the information about your integration and click Add.
Verification steps
- Verify a checkmark with Enabled in the Detailed usage cost section, with correct Project name and Dataset name.