topics
January 7, 2025
Benefit: CloudHealth is granted access to all projects in the billing account at the organization level.
Overview: Create a custom role and IAM member at the organization level and assign the role and IAM member to the service account. When new projects are added to the billing account, the organization-level role and IAM member are automatically inherited by the new projects.
You must create a new custom role for the organization level setup, even if you already have created a Owner role or your default Editor role has all the permissions.
Use When:
Configuring GCP Accounts in the Google Console
You can configure your GCP account using the Google Console. CloudHealth recommends using the Google Console if you are a new Google Cloud user or are unfamiliar with gcloud.
Create a custom role in the Google Console that you can later assign to your service account.2w
Log in to the Google Console and select the organization associated with the billing account.
In the left menu, go to IAM & admin > Roles and select Create Role.

Give your custom role a unique name in the Title field.
Select Add Permissions.

Download Least Privileged Custom Role YAML file. Select, at minimum, the permissions specified in the YAML file.

Without these permissions, CloudHealth is unable to provide reports and recommendations on how to save costs. You can assign additional permissions beyond the above list as needed.
Open a text document, such as TextEdit or NotePad, so that you can store specific parameters that you need to provide in the CloudHealth Platform.
Log in to the Google Cloud Console, and select a project assigned to the billing account you want to add to CloudHealth.
CloudHealth is connecting to your Google billing account via the selected project, do not select a project that might be deleted in the future.

From the left menu, click IAM & Admin > Service Accounts.
On the Service accounts page, click Create Service Account.




Checkpoint: At this point, you have the following information in the text document.
- Billing Account ID
- Service Account ID
- Private Key
Select the organization associated with the billing account.

From the left menu, select IAM and Admin and click Add.

In the Members field, paste the ID of the service account you created. From the Role dropdown, select the custom role you created. Click Add.

Enable APIs that allow CloudHealth to gather cost and tagging information.

Search for and locate the following APIs. Then click Enable APIs and Services on the landing page of each API.


CloudHealth requires your service account role to be enabled with certain permissions to properly access and report on your BigQuery data. These permissions are not included in the default Viewer role in the Google Console. If you have assigned your service account a Viewer role, you cannot view your BigQuery data in CloudHealth and must change your service account role to a custom role.
BigQuery is Google's enterprise data warehouse. BigQuery provides billing data that contains more information on customer datasets and is easier to use for custom reporting than daily CSV exports.
BigQuery must be enabled for billing export in the Google Console before you can enable BigQuery in the CloudHealth Platform. Complete these instructions to do so.

From the left menu, select Billing, and select your billing account.
From the left menu, select Billing export. Copy the Dataset name, and paste it in the text document.

Once you enable Billing export to CloudHealth, ensure your GCP BigQuery table is not empty. To verify whether the table contains cost data, click the BigQuery table name from the left navigation and select the Preview tab. For the successful configuration of the GCP accounts, the GCP BigQuery table must include the cost data.

The CloudHealth platform supports enabling both Standard usage cost and Detailed usage cost. The Standard option with the database table name
gcp_billing_export_v1_<billing account ID>is selected by default. If you enable the Detailed option, you must update the database table name togcp_billing_export_resource_v1_<BILLING_ACCOUNT_ID>via API. Though the Detailed table provides additional fields, note that CloudHealth does not report on any new data from the resource table.
You need to configure only the billing account. CloudHealth discovers all derived projects associated with the billing account that have incurred costs.
Log in to the CloudHealth platform and from the left menu, select Setup > Accounts > GCP Billing. Then click Add Account.
Enter all the information from the text document into the appropriate fields.

When you use a JSON key, CloudHealth verifies that the project ID in the JSON key matches the ID of the project to which you are attaching the credentials.
This option should be used if you want to use different service accounts for billing data collection and asset metadata collection.

CloudHealth validates new Google Service Accounts and derived projects every 4 hours. You can view derived projects by going to Setup > Accounts > GCP Project. Projects you enable in the CloudHealth Platform change status from Not Configured to Green, Yellow, Red, or Pending.
The newly configured GCP billing accounts will be onboarded automatically, and within 48 hrs, you will see the cost data in the CloudHealth platform.