Optima uses bill data to provide an accurate view of your costs across accounts and services. This data is consumed by the Optima platform and made available for pre-built and ad-hoc analyses. In order to gather the cost information, certain configuration steps must be performed with specific data and credentials being shared with Optima.
This page describes the configuration and input information needed to connect Google billing data to Optima using BigQuery billing exports.
For instructions on using Optima to add or update billing information, see the billing information guide. For instructions on connecting your cloud accounts to the platform for management purposes, see the cloud account management guide
This page walks you through the steps to connect your Google cloud billing data to RightScale for cost reporting purposes.
The following steps must be completed in order for RightScale to provide insight on your Google cloud bill:
Each of the steps above is explained in detail on this page.
Enable Billing Data Export to BigQuery in GCE
RightScale consumes the billing data via the BigQuery export method in Google. This can be enabled in GCE for each Billing Account and will contain data for all projects in that Billing Acccount.
RightScale uses BigQuery billing data as the source for billing information because the data is more complete (per Google). The estimated cost for BigQuery for billing purposes is no more than $100/yr for extremely large usage amounts (lesser usage will incur less cost). In some cases, the cost will be $0 as the entire usage will fall in the free tier of BigQuery.
If you have already configured billing export to BigQuery, please ensure you have the
Dataset ID and
Project that contains the dataset, and proceed to the next step.
If you need to configure data export to BigQuery, please follow the instructions provided by Google for your Google billing accounts.
Take note of the
Dataset ID when you create the dataset as well as the
Project in which the dataset exists.
Note that the Dataset ID is sometimes shown prepended with the project ID. For example,
project_id:dataset_id. In this case, please ensure you submit only the Dataset ID when registering your bill.
Determine ID of the Google Billing Account that pays for this bill's GCP resources
A Cloud Billing Account is a Google construct for managing usage and billing records for GCP resources payed for by a common entity. For more information on Google Cloud Billing Accounts, please see the GCP Overview of Cloud Billing Concepts.
To determine your Google Billing Account ID, navigate here and take note of the
Billing account ID circled in green below containing the billing data your wish to onboard.
Note: If you are unable to view any billing accounts in the above UI, please confirm that your user has the required Google privileges.
Allow RightScale to access the BigQuery dataset using a Service Account
Once your billing data is being exported to BigQuery, RightScale needs access to the BigQuery dataset to read the data. The RightScale platform uses a Google Service Account to gain access to the BigQuery dataset.
Once you have determined the service account you would like to use, the following steps must be completed:
Grant project-level IAM roles
The first step is to grant the service account the roles necessary to interact with BigQuery within the project.
- In Google Cloud Platform, navigate to the
- Ensure the selected project is the on that contains the billing BigQuery dataset
- Click on the
Addicon at the top of the window
- Enter the service account ID in the
- Select the
BigQuery Job Userrole
- BigQuery Job User - needed to create query jobs from which results can be read (currently 2 jobs per day are created)
Share the dataset with the service account
Additionally, the BigQuery dataset must explicitly be shared with the service account.
- In Google Cloud Platform, navigate to BigQuery
- Select the dataset that contains your billing data
In the dataset details pane, select
Add membersbox, enter the service account ID
Select a roledrop down, select
BigQuery Data Viewer
Submit the information
Follow the billing configuration guide to submit the above information to Optima