> For the complete documentation index, see [llms.txt](https://docs.fusion.vectra.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fusion.vectra.ai/cloud-onboarding/gcp-cloud-onboarding/quickstart-gcp/gcp-service-account-permissions.md).

# GCP service account permissions

Prepare GCP so Vectra can be added as a Pub/Sub principal.

{% hint style="info" %}
**📘The following steps are a prerequisite for adding Vectra as a principal to the Pub/Sub subscription.**

Before you can add Vectra as a principal, you must first grant Vectra's GCP identifier the initial permission GCP requires to certify Vectra is an entity that can be granted access to any of your resources.

**These steps do NOT grant Vectra any permissions or access to any resources in your organization**.

The following steps only enable you to grant Vectra select and specific access to individual resources in the future after these steps have been completed.
{% endhint %}

{% hint style="warning" %}
**🚧Organization Policy Administrator is needed to complete these steps.**

Updating an organization policy requires the Organization Policy Administrator role `roles/orgpolicy.policyAdmin`
{% endhint %}

{% hint style="info" %}
**📘Organizational policy requirement needed to complete these steps**

`iam.disableServiceAccountKeyCreation`needs to be set to **Not enforced** at the organization or project level
{% endhint %}

1. Go to the project picker, click the **All** tab, and select your **Organization**, instead of your project.

![](https://1075194167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7upncbzIm3grJePXaOO9%2Fuploads%2Fgit-blob-adf6f7b447153db042f204d4e985af311daf8d35%2Fcec8c36c3d6b14a310835398691a2b06a2c046383fc069a7d3354fdfa96d5f2d.png?alt=media) ![](https://1075194167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7upncbzIm3grJePXaOO9%2Fuploads%2Fgit-blob-5d43ad3f1f771ceff8e37e8c130075bb9d7987d2%2F5c64d8f1df0356294bba75c41c0f35be9b41311c0cf7c7a05a1bb2074d216362.png?alt=media)

2. Go to the **Organization Policies** page

![](https://1075194167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7upncbzIm3grJePXaOO9%2Fuploads%2Fgit-blob-a4681ea96e0f0c1176714e861b095f1b8bc29aa4%2F7185679c72737209e4abd7e052c6c52e2c1f02d020f1516bfdf7dd26c231cd0e.png?alt=media)

3. Click Filter above the policies table, type Domain restricted sharing.

![](https://1075194167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7upncbzIm3grJePXaOO9%2Fuploads%2Fgit-blob-2620b94af9c6f19d5129ace92dedb4c448903a50%2F0e3a3e2321e5ecbcb02351c1ec379505701d6ada69063bf6cbcfc3d46e8c7f0c.png?alt=media)

4. You should see 1 policy with ID `constraints/iam.allowedPolicyMemberDomains`. Click on **⋮** for the actions menu then **Edit Policy**.

![](https://1075194167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7upncbzIm3grJePXaOO9%2Fuploads%2Fgit-blob-594f799e7b6964fe6cdf50bf000f867300c2047b%2F1c000def650342bd5670d3e94bb5f7ec128576435165e8d51ec22a1373b6ea81.png?alt=media)

5. Choose **Override parent's policy** and select **Replace** for **Policy enforcement**.

![](https://1075194167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7upncbzIm3grJePXaOO9%2Fuploads%2Fgit-blob-75b13dfa1e7a841038b4d0a628d61bbcaabefa28%2F972ae7eb89aafec18d3cb83aa14b595555560b18fd64a9d53a08228140267648.png?alt=media)

6. Add a new rule (or add a value to an existing rule) for the policy with **Policy values** set to **Custom** and **Policy type** set to **Allow**.
7. Add value `C04ddcbu8` for Vectra.

![](https://1075194167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7upncbzIm3grJePXaOO9%2Fuploads%2Fgit-blob-366e547f46f95705bda981a4e8db50e291a104d5%2Fb28c369fb197cd19b935bec307d7111881af96e7e87292758f3708c302dd1d18.png?alt=media)

{% hint style="success" %}
**✅You're done!**
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fusion.vectra.ai/cloud-onboarding/gcp-cloud-onboarding/quickstart-gcp/gcp-service-account-permissions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
