# Google Cloud
Connecting Cloud Ctrl to your Google Cloud usage cost data requires that billing exports are configured to export into a BigQuery dataset within a Cloud Project that you specify. It also requires setting up a 'Service Account Key' to facilitate Cloud Ctrl connecting to the BigQuery dataset.
Cloud Ctrl consumes the dataset data from the exported reports and does not require direct access to your Google Cloud account.
# Create Google Service Account Key
In order to create/manage a Google service account key for use with Cloud Ctrl, it is best to follow the latest Google documentation (opens new window).
The created key has the following format
# Google Cloud Permissions Required
To enable and configure the export of Google Cloud billing usage cost data to a BigQuery dataset, you need the following permissions:
- You need either the Billing Account Costs Manager role or the Billing Account Administrator role on the target Cloud Billing account.
- For BigQuery, you need the BigQuery User role for the Cloud project that contains the BigQuery dataset to be used to store the Cloud Billing data.
You might also need other project permissions. If you are a member of a Google Cloud Organization, to create a new project, you need the Project Creator role on the Organization or Folder. Specifically, to create a new project, you need the following permissions:
# Configure Detailed Billing Data Exports
Complete the steps detailed in this section to enable the export of your Cloud Billing data to BigQuery. These steps have been summarised from the Google Cloud (opens new window) documentation.
# Select or create a project
Google Cloud Billing data exported to BigQuery is contained in a BigQuery dataset. A dataset is contained within a Google Cloud project you specify. We recommend that you create a seperate Google Cloud project to contain all of your Cloud Ctrl usage cost data. The Google Cloud project you select to contain your dataset should be linked to the same Google Cloud Billing account that contains the data that you plan to export to the BigQuery dataset. A Google Cloud project is linked to exactly one Google Cloud Billing account at a time.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
# Verify that billing is enabled
You must make sure that billing is enabled on the Cloud project you select to contain your dataset, and that the Cloud project is linked to the same Cloud Billing account that contains the data that you plan to export to the BigQuery dataset.
- Learn how to confirm billing is enabled for your project (opens new window)
- Learn how to view projects linked to Cloud Billing accounts (opens new window)
# Enable Google Cloud billing export to BigQuery dataset
You enable Cloud Billing data export in the Cloud Billing section of the Google Cloud console. 'Detailed usage cost data' is the type of export that needs to be configured for Cloud Ctrl.
Before you enable your Cloud Billing data to export to BigQuery, you must create at least one BigQuery dataset to manage your exported data. This can be done from the Detailed usage cost billing export screen.
Once saved, detailed usage cost data will be exported to a new table within the selected dataset.
# Create the Cloud Account
To add a new cloud account go to Settings > Google > Add
Supply a name for the Cloud Account, this is an internal name used within Cloud Ctrl for you to be able to identify this connection amongst multiple connections, unless you have multiple Google connections then Google is a suitable name.
Attach or paste in the json Service Account Key created in the step above, as well as the Dataset ID and the Table ID for the created BigQuery data export.