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.
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
- Go to Roles page and click Create Role.
- Give the role any name and description.
- 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.
- Go to Service accounts page and click Create Service Account
- Give it any name and click Create and Continue.
- Specify the role that you created earlier and click Continue and then Done
Generate API key for your service account
- Find your service account in the service accounts list and click on its name to go to service account details page.
- Go to Keys tab.
- Click Add key -> Create new key
- 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.
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.