# GCP Bucket Target Permissions

To add a GCP bucket as a target within Trilio for Kubernetes (T4K), specific bucket permissions are required. Follow the steps below to configure the necessary permissions:

## Steps

1. Create a custom role with the following permissions:

```
# Permission list
storage.objects.create
storage.objects.delete
storage.objects.get
storage.objects.list
storage.objects.update
```

```bash
# GCloud command
gcloud iam roles create <ROLE-NAME> --project=<PROJECT-ID> \
    --title="t4k-gcp-target-role" --description="Role with required GCP bucket access for T4K target" \
    --permissions="storage.objects.create,storage.objects.delete,storage.objects.get,storage.objects.list,storage.objects.update" --stage=GA
```

2. [Associate the created role](https://cloud.google.com/iam/docs/configuring-resource-based-access) with a service account whose access key and secret key will be used when creating the target in T4K.
3. If the service account does not have an access key and secret key, [follow this guide](https://cloud.google.com/storage/docs/authentication/managing-hmackeys) to generate a new access key and secret key, which are required when creating the target.


---

# 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.trilio.io/kubernetes/configuration/gcp-bucket-target-permissions.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.
