# Google Cloud Platform (GCP)

The GCP Cloud Provider lets DuploCloud AI agents interact with your Google Cloud account — querying resources, running `gcloud` commands, and managing infrastructure on your behalf. Authentication uses a **Service Account** key.

***

## Step 1 — Create a Service Account Key in GCP

Before setting up the provider in DuploCloud, you need to generate a JSON key file from your GCP service account.

1. In the GCP Console, go to **IAM & Admin** → **Service Accounts**
2. Select an existing service account or create a new one
3. Click the service account → **Keys** tab → **Add Key** → **Create new key** → **JSON**
4. Click **Create** — GCP will download a JSON file to your machine

Open the downloaded JSON file. You will use three values from it when setting up DuploCloud:

* **`project_id`** — your GCP Project ID
* **`client_email`** — the service account email
* **`private_key`** — the full private key starting from `-----BEGIN RSA PRIVATE KEY-----`

> **Note:** The service account needs appropriate IAM roles assigned at the project level (e.g. **Viewer** for read-only access, or broader roles if the agent needs to create or modify resources).

***

## Step 2 — Add the GCP Provider

In DuploCloud, go to **Providers** in the left sidebar, select your tenant (e.g. **IT**), and click the **Cloud** tab. Click **+ Add**.

![Cloud providers list](/files/CDjzhqI9u7Iv8bXXraiW)

Fill in the **Add Provider** form:

* **Name** — a name for this provider (e.g. `GCP-TEST`)
* **Type** — select `GCP`
* **Project ID** — your GCP project ID (found as `project_id` in the JSON key file)

Click **Create Provider**.

![Add Provider form](/files/eyrQ7R2bBsors7dDObBj)

***

## Step 3 — Add a Credential

Click on your new provider to open it, then go to the **Credentials** tab and click **+ Add**.

The **Add Credential** form has two dedicated fields for GCP:

![Add Credential modal — empty](/files/y5HsTSfik7ve5USqjBTy)

Fill in:

* **Name** — a name for this credential (e.g. `GCP-Test`)
* **Service Account Email** — the `client_email` value from the JSON key file
* **Service Account Password** — paste the full `private_key` value from the JSON key file, starting from `-----BEGIN RSA PRIVATE KEY-----` and including the closing `-----END RSA PRIVATE KEY-----` line

Click **Create**.

![Add Credential modal — filled](/files/Nnl8nHUDTxVWJ7sxPpeH)

***

## Step 4 — Add a Scope

On the **Scope** tab, click **+ Add**.

* **Name** — a name for this scope (e.g. `GCP-test-scope`)
* **Credential** — select the credential you just created

Click **Create**. The scope appears in the list.

![Scope created](/files/9AKNQFxsuGP4GSMPEWXA)

***

## Step 5 — Use the Scope in a Ticket

Go to **HelpDesk** and create a new ticket. In the scope selector, choose the GCP scope from the dropdown.

![Scope dropdown with GCP scope selected](/files/vXRw6GemBC4RW97QYYjP)

Type your request and click **Create Ticket**.

![Ticket ready with GCP scope](/files/XBMU2bQeM38EuLvrN2N4)

***

## Step 6 — Output

The agent authenticates with GCP using the service account and executes the request. Results appear in the ticket thread.

![Agent output — GCP query results](/files/3o6fg47M6Cc6trKJBeA1)


---

# 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.duplocloud.com/docs/getting-started/integrating-providers/google-cloud-platform-gcp.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.
