Skip to content

Connecting a GCP account

Enable billing export

Please follow the official GCP guide to enable billing data export - Set up Cloud Billing data export to BigQuery | Google Cloud.

As the result you should have a new table in your BigQuery project. Note the names of the dataset and the table. You will need them later when connecting your cloud account to DigiUsher. GCP EBR

Prepare a role

With a CLI command

Run the following command in the terminal:

Mac or Linux (replace project name in second line):

gcloud iam roles create digiusher_connection_role \
    --project=PROJECT_NAME \
    --permissions=bigquery.jobs.create,bigquery.tables.getData,\
compute.addresses.list,\
compute.disks.list,compute.disks.setLabels,\
compute.instances.list,compute.instances.setLabels,\
compute.machineTypes.get,compute.machineTypes.list,\
compute.networks.list,compute.regions.list,\
compute.snapshots.list,compute.snapshots.setLabels,\
compute.zones.list,\
monitoring.timeSeries.list,\
storage.buckets.get,storage.buckets.list,storage.buckets.update

Windows (replace project name in second line):

gcloud iam roles create digiusher_connection_role ^
    --project=PROJECT_NAME ^
    --permissions=bigquery.jobs.create,bigquery.tables.getData,^
compute.addresses.list,^
compute.disks.list,compute.disks.setLabels,^
compute.instances.list,compute.instances.setLabels,^
compute.machineTypes.get,compute.machineTypes.list,^
compute.networks.list,compute.regions.list,^
compute.snapshots.list,compute.snapshots.setLabels,^
compute.zones.list,^
monitoring.timeSeries.list,^
storage.buckets.get,storage.buckets.list,storage.buckets.update

Via Google Cloud Console

  1. Go to Roles page and click Create Role.
  2. Give the role any name and description.
  3. Add the following permissions:
bigquery.jobs.create
bigquery.tables.getData
compute.addresses.list
compute.disks.list
compute.disks.setLabels
compute.instances.list
compute.instances.setLabels
compute.machineTypes.get
compute.machineTypes.list
compute.networks.list
compute.regions.list
compute.snapshots.list
compute.snapshots.setLabels
compute.zones.list
monitoring.timeSeries.list
storage.buckets.get
storage.buckets.list
storage.buckets.update

Create service account

Official documentation on service accounts - Service accounts | IAM Documentation | Google Cloud.

  1. Go to Service accounts page and click Create Service Account
  2. Give it any name and click Create and Continue.
  3. Specify the role that you created earlier and click Continue and then Done

Generate API key for your service account

  1. Find your service account in the service accounts list and click on its name to go to service account details page.
  2. Go to Keys tab.
  3. Click Add key -> Create new key
  4. Service account API key will be downloaded as a .json file. You will need this file on the next stage when connecting your cloud account to DigiUsher.

Note: If the GCP project you are adding is different from the project where the billing dataset is located, there is an extra step to grant access to the dataset to the newly created service account. Please follow the instructions here.

Connect data source in DigiUsher

Use the newly downloaded service account credentials json file with the billing dataset details to connect your GCP cloud account. GCP CON

Your GCP data source should now be ready for integration with DigiUsher! Please contact our Support Team at support@digiusher.com if you have any questions or face any issues.