This article describes the steps required to connect your GCP (Google Cloud Platform) account to Anodot Cost.
- Create a Billing report (as described here: https://cloud.google.com/billing/docs/how-to/export-data-bigquery-setup). Note that the Billing table includes the following:
-
gcp_billing_export_v1_<BILLING_ACCOUNT_ID>
OR -
If the resource table was enabled: gcp_billing_export_resource_v1_<BILLING_ACCOUNT_ID>
-
Take note of the billing table name, we will need this at a later stage during the account connection process.
-
- Enable the Recommender API (as described here: https://cloud.google.com/recommender/docs/enabling#console)
- Create a Role and Key, as per the following steps:
- Create a Role with the following permissions:
-
Specific permission bigquery.jobs.create permission
-
Compute Viewer
-
Monitoring Viewer
-
Compute Recommender Viewer
-
Storage Object Viewer
-
-
Fill in the Title and ID fields and then click ADD PERMISSIONS.
-
Add permissions according to the list above. Note that you should go through all of the pages and add all permissions.
- Create a Role with the following permissions:
- Click Create Service Account to create a service account and attach the created role to it.
- For the new service account, click the More options icon and select Create key.
- Add the Big Query Data Viewer to the dataset, as described in the following steps:
- Navigate to the BigQuery service and find the dataset you created in the billing export (step 1), and open it:
- Click SHARE DATASET.
- In the Dataset Permissions tab, under members, search for the service account you created in the previous step:
- Select the BigQuery Data Viewer role, click Add, and then Done.
- Navigate to the BigQuery service and find the dataset you created in the billing export (step 1), and open it:
- Navigate on the Anodot Cost platform to the Cloud Accounts tab under the Account menu (accessed from your profile avatar, in the top right corner):
- (Optional) Connect an additional project. Note that connecting an additional project enables Anodot Cost to analyze multiple projects in one single authorized service account.
- Navigate to IAM & Admin > Service accounts in the project you created the service account in initially and make a note of the email address, as it will be needed later on.
- Go to the destination project, i.e. the one that you want to add in the service account, and navigate to IAM & Admin > IAM. Then click ADD.
- Set the email you noted above and grant the the required roles (i.e. Compute Viewer, Monitoring Viewer, Storage Object Viewer, Compute Recommender Viewer, etc.). You can use the Currently used quick filter to find the required roles.
- Click Save to save the changes.
- Navigate to IAM & Admin > Service accounts in the project you created the service account in initially and make a note of the email address, as it will be needed later on.