This page shows how to set a custom description on your Cloud Run
worker pools. A description is optional human-readable text attached to the
worker pool.

A description is limited to 512 characters.
If present, the description is displayed when
[viewing details of a worker pool using `gcloud run worker-pools describe`](https://docs.cloud.google.com/run/docs/managing/workerpools.md.txt#command-line_1).

## Required roles


To get the permissions that
you need to configure and deploy Cloud Run worker pools,

ask your administrator to grant you the
following IAM roles:

- [Cloud Run Developer](https://docs.cloud.google.com/iam/docs/roles-permissions/run.md.txt#run.developer) (`roles/run.developer`) on the Cloud Run worker pool
- [Service Account User](https://docs.cloud.google.com/iam/docs/roles-permissions/iam.md.txt#iam.serviceAccountUser) (`roles/iam.serviceAccountUser`) on the service identity


For a list of IAM roles and permissions that are associated with
Cloud Run, see
[Cloud Run IAM roles](https://docs.cloud.google.com/run/docs/reference/iam/roles.md.txt)
and [Cloud Run IAM permissions](https://docs.cloud.google.com/run/docs/reference/iam/permissions.md.txt).
If your Cloud Run worker pool interfaces with
Google Cloud APIs, such as Cloud Client Libraries, see the
[service identity configuration guide](https://docs.cloud.google.com/run/docs/configuring/workerpools/service-identity.md.txt).
For more information about granting roles, see
[deployment permissions](https://docs.cloud.google.com/run/docs/reference/iam/roles.md.txt#additional-configuration)
and [manage access](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).

## Set or modify a description

Set a description on Cloud Run worker pools using the Google Cloud CLI
when you [create a new worker pool](https://docs.cloud.google.com/run/docs/deploy-worker-pools.md.txt#worker-pool):

### gcloud

You can set or update the description during [deployment](https://docs.cloud.google.com/run/docs/deploy-worker-pool#worker-pool):

<br />

```bash
gcloud run worker-pools deploy WORKER_POOL --description DESCRIPTION
```

<br />

Replace the following:

- <var translate="no">WORKER_POOL</var>: the name of your Cloud Run worker pool
- <var translate="no">DESCRIPTION</var>: the description of the worker pool

### YAML

1. If you are creating a new worker pool, skip this step.
   If you are updating an existing worker pool, download its [YAML configuration](https://docs.cloud.google.com/run/docs/reference/yaml/v1.md.txt):

   ```bash
   gcloud run worker-pools describe WORKER_POOL --format export > worker-pool.yaml
   ```
2. The following example contains the YAML configuration:

   ```yaml
   apiVersion: run.googleapis.com/v1
   kind: WorkerPool
   metadata:
     name: WORKER_POOL
       run.googleapis.com/description: DESCRIPTION
   ```

   Replace the following:
   - <var translate="no">WORKER_POOL</var>: the name of your Cloud Run worker pool
   - <var translate="no">DESCRIPTION</var>: the description of the worker pool
3. Create or update the worker pool using the following command:

   ```bash
   gcloud run worker-pools replace worker-pool.yaml
   ```

   The `gcloud run worker-pools replace` command defaults to using `worker-pool.yaml` file if present.

### Terraform

To learn how to apply or remove a Terraform configuration, see
[Basic Terraform commands](https://docs.cloud.google.com/docs/terraform/basic-commands.md.txt).

```terraform
resource "google_cloud_run_v2_worker_pool" "default" {
  name     = "WORKER_POOL"
  location = "REGION"

  template {
    containers {
      image = "IMAGE_URL"
    }
  }
  description = "DESCRIPTION"
}
```

Replace the following:

- <var translate="no">WORKER_POOL</var>: the name of the worker pool
- <var translate="no">REGION</var>: the Google Cloud region---for example, europe-west1
- `IMAGE_URL`: a reference to the container image that contains the worker pool, such as `us-docker.pkg.dev/cloudrun/container/worker-pool:latest`
- <var translate="no">DESCRIPTION</var>: the description of the worker pool