Cloud Cost Optimization uses bill data to provide an accurate view of your costs across accounts and services. This data is consumed by the Flexera One 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 Cloud Cost Optimization.
This section describes the configuration and input information needed to connect Google billing data to Cloud Cost Optimization using BigQuery billing exports. The following steps must be completed to connect your Google cloud billing data to Cloud Cost Optimization for cost reporting purposes:
|•||Enable Billing Data Export to BigQuery in Google Compute Engine|
|•||Determine ID of the Google Billing Account That Pays for This Bill’s GCP Resources|
|•||Allow Cloud Cost Optimization to Access the BigQuery Dataset Using a Service Account|
For instructions on using Cloud Cost Optimization to add or update billing information, see Adding New Billing Data or Updating Billing Data Configurations. For instructions on connecting your cloud accounts to Policies, see .
Cloud Cost Optimization consumes Google billing data via the BigQuery export method in Google. (See Google’s “Export Cloud Billing Data to BigQuery” documentation for details.) This feature can be enabled in Google Compute Engine (GCE) for each billing account and will contain data for all projects in that billing account.
Important:Cloud Cost Optimization uses BigQuery billing data as the source for billing information because the data is more complete. (See Google’s “Export Cloud Billing Data to BigQuery” documentation for details.) 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, 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, 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:The Dataset ID is sometimes shown prepended with the project ID. For example, project_id:dataset_id. In this case, ensure you submit only the Dataset ID when registering your bill.
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, see the GCP documentation,.
Once your billing data is being exported to BigQuery, Cloud Cost Optimization needs access to the BigQuery dataset to read the data. The Cloud Cost Optimization platform uses a Google service account to gain access to the BigQuery dataset.
Create or identify which Google service account you want to use for this permission, and ensure you have access to the JSON private key for the service account as well as the service account ID. Refer to Google’s documentation on creating a Google service account and creating service account keys for instructions.
Once you have determined the service account you would like to use, the following steps must be completed:
|•||In GCP, grant project-level IAM roles in GCP for the service account in the project that contains the billing BigQuery dataset. Roles required: BigQuery Data Viewer and BigQuery Job User. BigQuery Data Viewer is required to read data from the specified dataset. BigQuery Job User is needed to create query jobs from which the results can be read. (Currently 2 jobs per day are created.)|
|•||In Google’s BigQuery, share the dataset with the service account. The BigQuery dataset must explicitly be shared (view access) with the service account.|
To submit Google billing data to Cloud Cost Optimization, see Using Cloud Cost Optimization API for Bill Connects.