# Onboarding GCP project onto Economize

After signing up with [Economize](https://www.economize.cloud/signup) to onboard your GCP project, select the **Connect GCP** option when choosing your provider, and follow these steps:&#x20;

<div data-full-width="false"><figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2FHoliZPlghw7Msaai7ZYf%2FScreenshot%202025-01-30%20at%2012.58.21%E2%80%AFPM.png?alt=media&#x26;token=4a954b47-b589-4c97-af73-6a70005a855a" alt="" width="563"><figcaption></figcaption></figure></div>

## Step 1: Add GCP configuration information

#### Add Project ID

Enter the project ID that you wish to initially onboard onto Economize. We recommend you to enter the project ID of the main GCP project.

#### **Add BigQuery dataset ID**

You can use an existing BigQuery dataset or create a new one dedicated specifically for importing cloud billing data by following these [instructions](https://cloud.google.com/bigquery/docs/datasets#create-dataset). &#x20;

In the GCP console, navigate to [BigQuery](https://console.cloud.google.com/bigquery), and in the **Dataset info** screen of BigQuery, observe the value on the **Data set ID** line and copy and paste it into the provided field during the onboarding process.

<div data-full-width="false"><figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2FepYM1JYcLIlNqDI0M8cg%2FScreenshot%202024-02-02%20at%208.33.50%20PM.png?alt=media&#x26;token=171c3d68-d913-4850-bbd7-d02857dc4f49" alt="" width="563"><figcaption></figcaption></figure></div>

## Step 2: Enable cloud billing export to the BigQuery dataset <a href="#step-3-enable-cloud-billing-export-to-the-bigquery-dataset" id="step-3-enable-cloud-billing-export-to-the-bigquery-dataset"></a>

GCP provides an option to export your billing data to the BigQuery dataset. This consists of details regarding your usage, and pricing data.

1. Click the hamburger menu at the top left of the GCP console, and select **Billing**.
2. In the left **Billing navigation menu**, select **Billing Export**.
3. For both **Standard usage cost** and **Detailed usage cost**, click **EDIT SETTINGS** to enable them.
4. Configure the following settings:
   * From the **Projects** list, select the project you set up to contain your billing data.
   * For **Dataset**, select the dataset that you set up to contain your exported Cloud Billing data.
5. Click on **SAVE**.
6. Once both exports are enabled they will indicate the same as follows:

<figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2F4O1mwLhIBHC6hh4xxzq9%2FScreenshot%202024-02-02%20at%208.30.20%20PM.png?alt=media&#x26;token=22aa83d4-54c9-432d-89e4-95ac2ea0f78d" alt="" width="563"><figcaption></figcaption></figure>

## Step 3: Validate service account credentials

Economize uses a [service account](https://cloud.google.com/iam/docs/service-accounts) to integrate with your GCP account. You can choose to provide access either by using the **Service account managed by Economize** or by **Bringing your own service account**.

You will need to provide the service account with the required permissions as mentioned in the next two steps.

{% tabs %}
{% tab title="Service account managed by Economize" %}
When using the service account managed by Economize, you will need to copy the service account generated at the time of the onboarding process within the application and use it to provide the permission as listed in steps 4 and 5.
{% endtab %}

{% tab title="Bring your own service account" %}
When you bring your own service account you need to upload your service account's key, which Economize securely stores.

First, you need to create a service account, grant it the relevant roles, and generate a key. Make sure you create a JSON key, not P12. Once the service account and key have been created, download the key to your machine and paste it into the provided field.

Economize then parses the key, and if it's valid, you can continue forward to provide the permission as listed in steps 4 and 5.&#x20;

**Follow these steps to create a service account and generate a JSON key:**

1. Go to the [**Service Accounts page**](https://console.cloud.google.com/iam-admin/serviceaccounts?_ga=2.217475409.69001049.1599737573-1418460762.1586981009&_gac=1.37407380.1599057592.EAIaIQobChMI__vz0dnK6wIViSQrCh1_2AglEAAYASAAEgKnivD_BwE) in the console and click on **Create Service Account.**

<figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2FChghyfpk4LZNBM3JWleX%2Fimage.png?alt=media&#x26;token=bda914ad-c71a-4817-b8db-9fe59ccdde68" alt="" width="498"><figcaption></figcaption></figure>

2. Provide a name to the service account and click **Done** to create the service account.
3. Note down the service account email as it will be used in the next steps 4 & 5 when granting it with required permissions.
4. Navigate to the service account that you have just created, and select the three vertical dots next to it, and click on the **Manage Keys** button.
5. Click on the **Add Key** button in the **KEYS** section.

<figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2F5Ib4NT76aqa3kYM1C7YN%2Fkeys.png?alt=media&#x26;token=dac7d2e6-0ff4-4c5c-be12-6ad5a0fcc8f6" alt="" width="563"><figcaption></figcaption></figure>

6. Select the **JSON** key type and click on the **Create** button.

<figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2Fpa1llVEjrnKHFf1qcFYm%2Fyp.png?alt=media&#x26;token=9694fa9e-20dd-427b-9646-ccb39b7943d6" alt="" width="461"><figcaption></figcaption></figure>

9. The JSON key will be downloaded to your local system. Copy this key and paste it into the below-provided field during the onboarding process.

<figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2FYpi9DtGzohvj5L2GiFmq%2FScreenshot%202025-01-30%20at%201.04.48%E2%80%AFPM.png?alt=media&#x26;token=e92309bc-9378-4262-b4f2-094e415e6023" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Step 4: Grant the viewer permission to the service account&#x20;

Navigate to the [IAM console](https://console.cloud.google.com/iam-admin/iam), and complete the steps below to grant the service account permission to access project resources.

1. At the top of the IAM console, select the project whose ID you entered in the first step.
2. Configure the permission as follows:

   * In the center of the page, under **Permissions for project "My Project XYZ"**, click **+ GRANT ACCESS**.
   * In the **New principals** field, under **Add principals**, paste the value of the service account based on your selected access method in Step 3.
   * In the **Role** field, under **Assign roles**, search for and select **Viewer**.

   <figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2FKsrCiVeLOd9A6YHRX6TQ%2FScreenshot%202024-02-02%20at%208.20.29%20PM.png?alt=media&#x26;token=3a659a7a-7545-4777-830c-973c51a04500" alt="" width="563"><figcaption></figcaption></figure>
3. Click on **SAVE**.

## Step 5: Assign BigQuery Data Editor role to the service account

Go to [BigQuery](https://console.cloud.google.com/bigquery), and complete the following steps to permit the service account to access the BigQuery dataset.

1. At the top of the BigQuery console, ensure the project containing the BigQuery dataset whose ID you entered in the first step is selected, then navigate to the **Explorer** panel, and select your project to expand it.
2. Configure the permission as follows:

   * Select the three vertical dots next to the dataset name, then click **Share**.
   * On the **Share permissions** panel that appears on the right, click **+ ADD PRINCIPAL**.
   * In the **New principals** field, under **Add principals**, paste the value of the service account based on your selected access method in Step 3.
   * In the **Role** field, under **Assign roles**, search for and select **BigQuery Data Editor**.

   <figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2FUPTL5hSkWhTZ3RF2wIn2%2FScreenshot%202024-02-02%20at%208.24.31%20PM.png?alt=media&#x26;token=2f8d5dab-5da6-4824-aabd-da09b8886426" alt="" width="563"><figcaption></figcaption></figure>
3. Click on **SAVE**.

{% hint style="success" %}
**SUCCESS**

It can take up to **24–48 hours** for the data to fully propagate if the linked billing dataset was created recently.

So, you might not be able to use all the features right away but you can still utilize the [Recommendations](https://docs.economize.cloud/product-features/recommendations) to start optimizing your costs.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.economize.cloud/google-cloud/onboarding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
