# GCP Cloud Storage

* Creation of Buckets
* Service Account Creation
* Grant Access to  Service Account on Buckets
* Updating environment variables in .env file

### Creation of Buckets

<details>

<summary>Navigate to Google Cloud Storage - Buckets</summary>

<img src="/files/1pBQpw4jNReAVL48rmSX" alt="" data-size="original">

</details>

<details>

<summary>Create Bucket</summary>

Click on CREATE Button

<img src="/files/lsST44bpujAyMVnJ3JFt" alt="" data-size="original">

Follow defaults and Provide "Public to internet " access by Granting "Storage Object Creator" Role to user "allUsers"

<img src="/files/ZD9grPo4fH2EoN81CFlg" alt="" data-size="original">

</details>

Two Buckets needs to be created - one for Storing videos and other for storing Profile images

### Service Account Creation

<details>

<summary>Navigate to IAM &#x26; Admin - Service Accounts</summary>

<img src="/files/56CEygZVBZxdNKbfuEIU" alt="" data-size="original">

</details>

<details>

<summary>Create Service Account</summary>

Click on CREATE SERVICE ACCOUNT Button

<img src="/files/yP1rwVUBIC2Sw6DfGvtR" alt="" data-size="original">

Follow the defaults and create account

</details>

<details>

<summary>Create Key</summary>

For the Service Account, create key and download it for updating it in .env file

<img src="/files/MzzLBDt3rvX4w3Aa8hJC" alt="" data-size="original">

</details>

### Grant Access to Service Account on Buckets

<details>

<summary>Navigate to Buckets created in last step</summary>

<img src="/files/t6q6YhJsnrGXOsdPz3rj" alt="" data-size="original">

Select PERMISSIONS tab and then click on GRANT ACCESS

Assign "Storage Object Admin" Role to the Service Account Created in last step

<img src="/files/gP6hu2MPWebY2ZXUHNuy" alt="" data-size="original">

</details>

### Updating environment variables

Set following environments variables in .env file

gcp\_image\_bucket\_name=\<Bucket name for storing Profile images>

gcp\_video\_bucket\_name=\<Bucket name for storing Videos>

gcp\_credentials='\<Paste contents of the Key file of Service Account>'


---

# 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.rairprotocol.org/rairprotocol/integrations/core-technologies/guides/gcp-cloud-storage.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.
