Your job might require API keys, passwords, certificates, or
other sensitive information for its dependencies. For Cloud Run,
Google recommends storing this sensitive information in a secret you create in
[Secret Manager](https://docs.cloud.google.com/secret-manager/docs.md.txt#docs).

Make a secret available to your containers in one of the following ways:

- When you mount each secret as a volume, Cloud Run makes the secret available to the container as files. When reading a volume, Cloud Run always fetches the secret value from the Secret Manager to use the value with the latest version. This method also works well with secret rotation.
- Pass a secret using [environment variables](https://docs.cloud.google.com/run/docs/configuring/jobs/environment-variables.md.txt). Environment variables are resolved at instance startup time, so if you use this method, Google recommends that you pin the secret to a particular version instead of using `latest` as the version.

For more information, see Secret Manager
[best practices](https://docs.cloud.google.com/secret-manager/docs/best-practices.md.txt).

## How secrets are checked at deployment and runtime

During job creation, Cloud Run checks all the secrets
you use. The check ensures that the service account that runs the container has
permission to access these secrets.

During runtime, when instances start up:

- If the secret is an environment variable, Cloud Run retrieves the value of the secret prior to starting the instance. If the secret retrieval process fails, the instance doesn't start.
- If you mount the secret as a volume, Cloud Run doesn't perform any checks during instance startup. However, during runtime, if a secret is inaccessible, attempts to read the mounted volume fail.

## Volume ownership

The ownership of a Cloud Run secret volume differs by the execution
environment and deployment type.


When you mount a secret volume using the second generation execution
environment, which is always the case for job, root owns the
volume.

## Before you begin

1.


   Enable the Secret Manager API, if it is not already enabled.


   **Roles required to enable APIs**


   To enable APIs, you need the `serviceusage.services.enable` permission. If you
   created the project, then you likely already have this permission through the
   Owner role (`roles/owner`). Otherwise, you can get this permission through the
   Service Usage Admin role (`roles/serviceusage.serviceUsageAdmin`).
   [Learn how to grant roles](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).

   [Enable the API](https://console.cloud.google.com/apis/enableflow?apiid=secretmanager.googleapis.com)
2. Use an existing secret or, create a secret in Secret Manager, as described in [Create a secret](https://docs.cloud.google.com/secret-manager/docs/creating-and-accessing-secrets.md.txt#create).

### Required roles


To get the permissions that
you need to configure secrets,

ask your administrator to grant you the
following IAM roles:

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


To allow Cloud Run to access the secret, the
[service identity](https://docs.cloud.google.com/run/docs/configuring/jobs/service-identity.md.txt) must have the following role:

- [Secret Manager Secret Accessor](https://docs.cloud.google.com/iam/docs/roles-permissions/secretmanager.md.txt#secretmanager.secretAccessor) (`roles/secretmanager.secretAccessor`)

For instructions on how to add the service identity principal to the
Secret Manager Secret Accessor role, see
[Manage access to secrets](https://docs.cloud.google.com/secret-manager/docs/manage-access-to-secrets.md.txt).

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 job interfaces with
Google Cloud APIs, such as Cloud Client Libraries, see the
[service identity configuration guide](https://docs.cloud.google.com/run/docs/configuring/jobs/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).

## Make a secret accessible to Cloud Run

You can make a secret accessible to your job
using the Google Cloud console, the Google Cloud CLI, or YAML:

### Console


1. In the Google Cloud console, go to the Cloud Run **Jobs** page:

   [Go to Cloud Run](https://console.cloud.google.com/run/jobs)
2. Click **Deploy container** to configure a new job. Fill out the
   initial job settings page, then click **Containers, Networking, Security**
   to expand the configuration page.

3. If you are configuring an existing job, click the
   job, and click **View and edit job configuration**.

4. Follow the steps to mount the secret as a volume, or expose the secret as
   an environment variable.

<br />

- To expose the secret as an environment variable:

  1. Click the **Container(s)** tab.
  2. In the **Variables and Secrets** tab, click **Reference a secret**.
  3. In the **Name 1** field, enter the name of the environment variable.
  4. From the **Secret** list, select the secret you want to use.
  5. From the **Version 1** list, select the version of the secret to reference.
  6. Click **Done**.
  7. Click **Create** or **Deploy**.
- To mount the secret as a volume:

  1. Click the **Volumes** tab.
  2. Click **Mount volume**.
  3. Click **Secret**.
  4. In the **Mount path** field, enter the mount path for this secret. This is the directory where all versions of your secret are placed.
  5. From the **Secret** list, select the secret you want to use.
  6. In the **Path 1** field, enter the name of the file to mount.
  7. In the **Version 1** list, select the version of the secret to reference. By default, the latest version is selected. You can select a specific version if you want.
  8. Click **Save**.
  9. Click **Create** or **Deploy**.

### gcloud

> [!NOTE]
> **Note:** You can update multiple secrets at the same time. To do this, separate the configuration options for each secret with a comma.

- To specify the secret in an environment variable when creating a new job:

  ```bash
  gcloud run jobs create JOB_NAME \
  --image IMAGE_URL \
  --set-secrets ENV_VAR_NAME=SECRET_NAME:VERSION
  ```

  Replace the following:
  - <var translate="no">JOB_NAME</var>: the name of your job.
  - <var translate="no">ENV_VAR_NAME</var>: the name of the environment variable to use for the secret.
  - <var translate="no">SECRET_NAME</var>: the secret name in the same project---for example, `mysecret`.
  - <var translate="no">VERSION</var>: the secret version. Use `latest` for latest version, or a number---for example, `2`.
  - `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.

  You can specify several environment variable/secret pairs, using a comma
  delimited list.
- To specify the secret in an environment variable when updating a job:

  ```bash
  gcloud run jobs update JOB_NAME \
  --set-secrets ENV_VAR_NAME=SECRET_NAME:VERSION
  ```
- To mount the secret as a volume when creating a job:

  ```bash
  gcloud run jobs create JOB_NAME \
  --image IMAGE_URL \
  --set-secrets=PATH=SECRET_NAME:VERSION
  ```

  Replace the following:
  - <var translate="no">JOB_NAME</var>: the name of your job.
  - `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
  - <var translate="no">PATH</var>: the mount path of the volume and filename of the secret. It must start with a leading slash---for example, `/etc/secrets/dbconfig/password`, where `/etc/secrets/dbconfig/` is the mount path of the volume, and `password` is the filename of the secret.
  - <var translate="no">SECRET_NAME</var>: the secret name in the same project---for example, `mysecret`.
  - <var translate="no">VERSION</var>: the secret version. Use `latest` for latest version, or a number---for example, `2`.
- To update a secret in an existing job:

  ```bash
  gcloud run jobs update JOB_NAME \
  --update-secrets=PATH=SECRET_NAME:VERSION
  ```

### YAML

Due to constraints around API compatibility, the secret locations must be stored
in an annotation.

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

   ```bash
   gcloud run jobs describe JOB --format export > job.yaml
   ```
2. For secrets exposed as environment variables:

   ```yaml
   apiVersion: run.googleapis.com/v1
   kind: Job
   metadata:
     name: JOB
   spec:
     template:
       spec:
         template:
           spec:
             containers:
             - env:
               - name: SECRET_NAME
                 valueFrom:
                   secretKeyRef:
                     key: VERSION
                     name: SECRET_LOOKUP_NAME
               image: IMAGE_URL 
   ```

   Replace the following:
   - <var translate="no">JOB</var>: the name of your job.
   - `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
   - <var translate="no">SECRET_NAME</var>: the secret name---for example, `mysecret`.
   - <var translate="no">VERSION</var>: the secret version. Use `latest` for latest version, or a number---for example, `2`.
   - <var translate="no">SECRET_LOOKUP_NAME</var>: any name that has a valid secret name syntax---for example, `my-secret`. It can be the same as <var translate="no">SECRET_NAME</var>.
3. For secrets mounted as file paths:

   ```yaml
   apiVersion: run.googleapis.com/v1
   kind: Job
   metadata:
     name: JOB_NAME
   spec:
     template:
       spec:
         template:
           spec:
             containers:
             - image: IMAGE_URL
               volumeMounts:
               - mountPath: MOUNT_PATH
                 name: VOLUME_NAME
             volumes:
             - name: VOLUME_NAME
               secret:
                 items:
                 - key: VERSION
                   path: FILENAME
                 secretName: SECRET_LOOKUP_NAME
   ```

   Replace the following:
   - <var translate="no">JOB_NAME</var>: the name of your job.
   - `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
   - <var translate="no">PATH</var>: the mount path of the volume and filename of the secret. It must start with a leading slash---for example, `/etc/secrets/dbconfig/password`, where `/etc/secrets/dbconfig/` is the mount path of the volume, and `password` is the filename of the secret.
   - <var translate="no">PROJECT_NUMBER</var>: the project number for the project the secret was created in.
   - <var translate="no">SECRET_NAME</var>: the secret name---for example, `mysecret`.
   - <var translate="no">VERSION</var>: the secret version. Use `latest` for latest version, or a number---for example, `2`.
   - <var translate="no">SECRET_LOOKUP_NAME</var>: any name that has a valid secret name syntax---for example, `my-secret`. It can be the same as <var translate="no">SECRET_NAME</var>.
   - <var translate="no">VOLUME_NAME</var>: any name---for example, `my-volume`. It can be the same as <var translate="no">SECRET_NAME</var>.

### 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).
Add the following to a [`google_cloud_run_v2_job`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_job) resource in your Terraform configuration:  

<br />

**For secrets exposed as environment variables:**

```terraform
resource "google_cloud_run_v2_job" "default" {
  name     = "JOB_NAME"
  location = "REGION"

  template {
    template {
      containers {
        image = "IMAGE_URL"

        env {
          name = "SECRET_NAME"

          value_source {
            secret_key_ref {
              secret = "SECRET_NAME"
              version = "VERSION"
            }
          }
        }
      }
    }
  }
}

```

Replace the following:

- <var translate="no">JOB_NAME</var>: the name of your Cloud Run job.
- <var translate="no">REGION</var>: the Google Cloud region. For example, `europe-west1`.
- `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
- <var translate="no">SECRET_NAME</var>: the secret name---for example, `mysecret`.
- <var translate="no">VERSION</var>: the secret version. Use `latest` for latest version, or a number---for example, `2`.

**For secrets mounted as file paths:**

```terraform
resource "google_cloud_run_v2_job" "default" {
  name     = "JOB_NAME"
  location = "REGION"

  template {
    template {
      containers {
        image = "IMAGE_URL"

        volume_mounts {
          name       = "VOLUME_NAME"
          mount_path = "MOUNT_PATH"
        }
      }

      volumes {
        name = "VOLUME_NAME"
        secret {
          secret = "SECRET_NAME"
        }
      }
    }
  }
}

```

Replace the following:

- <var translate="no">JOB_NAME</var>: the name of your Cloud Run job.
- <var translate="no">REGION</var>: the Google Cloud region. For example, `europe-west1`.
- `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
- <var translate="no">VOLUME_NAME</var>: any name---for example, `my-volume`. It can be the same as `SECRET_NAME`.
- <var translate="no">MOUNT_PATH</var>: the mount path of the volume and filename of the secret. It must start with a leading slash---for example, `/etc/secrets/dbconfig/password`, where `/etc/secrets/dbconfig/` is the mount path of the volume, and `password` is the filename of the secret.
- <var translate="no">SECRET_NAME</var>: the secret name---for example, `mysecret`.

#### Reference secrets from other projects

You can reference a secret from another project, if your project's service
account has been [allowed to access the secret](https://docs.cloud.google.com/run/docs/configuring/jobs/secrets.md.txt#access-secrets).

### Console


1. In the Google Cloud console, go to the Cloud Run **Jobs** page:

   [Go to Cloud Run](https://console.cloud.google.com/run/jobs)
2. Click **Deploy container** to configure a new job. Fill out the
   initial job settings page, then click **Containers, Networking, Security**
   to expand the configuration page.

3. If you are configuring an existing job, click the
   job, and click **View and edit job configuration**.

4. Follow the steps to mount the secret as a volume, or expose the secret as
   an environment variable.

<br />

- To expose the secret as an environment variable:

  1. Click the **Container(s)** tab.
  2. In the **Variables and Secrets** tab, click **Reference a secret**.
  3. In the **Name 1** field, enter the name of the environment variable.
  4. From the **Secret** list, click **Enter secret manually**.
  5. Enter the secret's resource ID in the following format:

         projects/PROJECT_NUMBER/secrets/SECRET_NAME

     Replace the following:
     - <var translate="no">PROJECT_NUMBER</var> with your Google Cloud project number. For
       detailed instructions on how to find your project number, see
       [Creating and managing projects](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects.md.txt#identifying_projects).

     - <var translate="no">SECRET_NAME</var>: The name of the secret in
       Secret Manager.

  6. From the **Version 1** list, select the version of the secret to reference.

  7. Click **Done**.

  8. Click **Create** or **Deploy**.

- To mount the secret as a volume:

  1. Click the **Volumes** tab.
  2. Click **Mount volume**.
  3. Click **Secret**.
  4. In the **Mount path** field, enter the mount path for this secret. This is the directory where all versions of your secret are placed.
  5. From the **Secret** list, click **Enter secret manually**.
  6. Enter the secret's resource ID in the following format:

         projects/PROJECT_NUMBER/secrets/SECRET_NAME

     Replace the following:
     - <var translate="no">PROJECT_NUMBER</var> with your Google Cloud project number. For
       detailed instructions on how to find your project number, see
       [Creating and managing projects](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects.md.txt#identifying_projects).

     - <var translate="no">SECRET_NAME</var>: The name of the secret in
       Secret Manager.

  7. In the **Path 1** field, enter the name of the file to mount.

  8. In the **Version 1** list, select the version of the secret to
     reference. By default, the latest version is selected. You can select
     a specific version if you want.

  9. Click **Save**.

  10. Click **Create** or **Deploy**.

### gcloud

- To mount a secret as a volume when updating a job:

  ```bash
  gcloud run jobs update JOB_NAME \
  --image IMAGE_URL \
  --update-secrets=PATH=projects/PROJECT_NUMBER/secrets/SECRET_NAME:VERSION
  ```
  - <var translate="no">JOB_NAME</var>: the name of your job.
  - `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
  - <var translate="no">PATH</var>: the mount path of the volume and filename of the secret. It must start with a leading slash---for example, `/etc/secrets/dbconfig/password`, where `/etc/secrets/dbconfig/` is the mount path of the volume, and `password` is the filename of the secret.
  - <var translate="no">PROJECT_NUMBER</var>: the project number for the project the secret was created in.
  - <var translate="no">SECRET_NAME</var>: the secret name---for example, `mysecret`.
  - <var translate="no">VERSION</var>: the secret version. Use `latest` for latest version, or a number---for example, `2`.

### YAML

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

   ```bash
   gcloud run jobs describe JOB --format export > job.yaml
   ```

Due to constraints around API compatibility, the secret locations must be stored
in an annotation.

1. For secrets exposed as environment variables:

   ```yaml
   apiVersion: run.googleapis.com/v1
   kind: Job
   metadata:
     name: JOB
   spec:
     template:
       metadata:
         annotations:
           run.googleapis.com/secrets: SECRET_LOOKUP_NAME:projects/PROJECT_NUMBER/secrets/SECRET_NAME
       spec:
         template:
           spec:
             containers:
             - env:
               - name: SECRET_NAME
                 valueFrom:
                   secretKeyRef:
                     key: VERSION
                     name: SECRET_LOOKUP_NAME
               image: IMAGE_URL 
   ```

   Replace the following:
   - <var translate="no">JOB</var>: the name of your job.
   - `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
   - <var translate="no">SECRET_NAME</var>: the secret name---for example, `mysecret`.
   - <var translate="no">VERSION</var>: the secret version. Use `latest` for latest version, or a number---for example, `2`.
   - <var translate="no">PROJECT_NUMBER</var>: the project number for the project the secret was created in.
   - <var translate="no">SECRET_LOOKUP_NAME</var>: any name that has a valid secret name syntax---for example, `my-secret`. It can be the same as <var translate="no">SECRET_NAME</var>.
2. For secrets mounted as file paths:

   ```yaml
   apiVersion: run.googleapis.com/v1
   kind: Job
   metadata:
     name: JOB_NAME
   spec:
     template:
       metadata:
         annotations:
           run.googleapis.com/secrets: SECRET_LOOKUP_NAME:projects/PROJECT_NUMBER/secrets/SECRET_NAME
       spec:
         template:
           spec:
             containers:
             - image: IMAGE_URL
               volumeMounts:
               - mountPath: MOUNT_PATH
                 name: VOLUME_NAME
             volumes:
             - name: VOLUME_NAME
               secret:
                 items:
                 - key: VERSION
                   path: FILENAME
                 secretName: SECRET_LOOKUP_NAME
   ```

   Replace the following:
   - <var translate="no">JOB_NAME</var>: the name of your job.
   - `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
   - <var translate="no">PATH</var>: the mount path of the volume and filename of the secret. It must start with a leading slash---for example, `/etc/secrets/dbconfig/password`, where `/etc/secrets/dbconfig/` is the mount path of the volume, and `password` is the filename of the secret.
   - <var translate="no">PROJECT_NUMBER</var>: the project number for the project the secret was created in.
   - <var translate="no">SECRET_NAME</var>: the secret name---for example, `mysecret`.
   - <var translate="no">VERSION</var>: the secret version. Use `latest` for latest version, or a number---for example, `2`.
   - <var translate="no">SECRET_LOOKUP_NAME</var>: any name that has a valid secret name syntax---for example, `my-secret`, it can be the same as <var translate="no">SECRET_NAME</var>.
   - <var translate="no">VOLUME_NAME</var>: any name---for example, `my-volume`, it can be the same as <var translate="no">SECRET_NAME</var>.

### 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).
Add the following to a [`google_cloud_run_v2_job`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_job) resource in your Terraform configuration:  

<br />

**For secrets exposed as environment variables:**

```terraform
resource "google_cloud_run_v2_job" "default" {
  name     = "JOB_NAME"
  location = "REGION"

  template {
    template {
      containers {
        image = "IMAGE_URL"
        env {
          name = "SECRET_NAME"
          value_source {
            secret_key_ref {
              secret = "projects/PROJECT_ID/secrets/SECRET_NAME"
              version = "VERSION"
            }
          }
        }
      }
    }
  }
}

```

Replace the following:

- <var translate="no">JOB_NAME</var>: the name of your Cloud Run job.
- <var translate="no">REGION</var>: the Google Cloud region. For example, `europe-west1`.
- `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
- <var translate="no">SECRET_NAME</var>: the secret name---for example, `mysecret`.
- <var translate="no">PROJECT_ID</var>: the project ID the secret was created in.
- <var translate="no">VERSION</var>: the secret version. Use `latest` for latest version, or a number---for example, `2`.

**For secrets mounted as file paths:**

```terraform
resource "google_cloud_run_v2_job" "default" {
  name     = "JOB_NAME"
  location = "REGION"

  template {
    template {
      containers {
        image = "IMAGE_URL"

        volume_mounts {
          name       = "VOLUME_NAME"
          mount_path = "MOUNT_PATH"
        }
      }

      volumes {
        name = "VOLUME_NAME"
        secret {
          secret = "projects/PROJECT_ID/secrets/SECRET_NAME"
        }
      }
    }
  }
}

```

Replace the following:

- <var translate="no">JOB_NAME</var>: the name of your Cloud Run job.
- <var translate="no">REGION</var>: the Google Cloud region---for example, `europe-west1`.
- `IMAGE_URL`: a reference to the [container image](https://docs.cloud.google.com/run/docs/building/containers.md.txt)---for example, `us-docker.pkg.dev/cloudrun/container/job:latest`.
- <var translate="no">VOLUME_NAME</var>: any name---for example, `my-volume`, it can be the same as `SECRET_NAME`.
- <var translate="no">MOUNT_PATH</var>: the mount path of the volume and filename of the secret. It must start with a leading slash---for example, `/etc/secrets/dbconfig/password`, where `/etc/secrets/dbconfig/` is the mount path of the volume, and `password` is the filename of the secret.
- <var translate="no">PROJECT_ID</var>: the project ID the secret was created in.
- <var translate="no">SECRET_NAME</var>: the secret name---for example, `mysecret`.

## View secrets settings

To view the current secrets settings for your
Cloud Run job, use the Google Cloud console or the Google Cloud CLI:

### Console

1. In the Google Cloud console, go to the Cloud Run jobs page:

   [Go to Cloud Run jobs](https://console.cloud.google.com/run/jobs)
2. Click the job to open the **Job details** page.

3. Click **View and edit job configuration**.

4. Locate the secrets setting in the configuration
   details.

### gcloud

1. Run the following command:

   ```bash
   gcloud run jobs describe JOB
   ```
2. Locate the secrets setting in the returned
   configuration.

## Limitations

The following sections describe the limitations that apply to mounting secrets.

### Disallowed paths

- Cloud Run doesn't allow you to mount secrets at `/dev`, `/proc` and `/sys`, or on their subdirectories.
- Cloud Run doesn't allow you to mount multiple secrets at the same path because two volume mounts can't be mounted at the same location.

### Regional secrets

Cloud Run does not support [regional secrets](https://docs.cloud.google.com/secret-manager/regional-secrets/create-regional-secret.md.txt).

### Overriding a directory

If the secret is mounted as a volume in Cloud Run, and the last
directory in the volume mount path already exists, then any files or folders in
the existing directory become inaccessible.

For example, if a secret called `my-secret` is mounted to path
`/etc/app_data`, all the contents inside the `app_data` directory will be
overwritten, and the only visible file is `/etc/app_data/my-secret`.

To avoid overwriting files in an existing directory, create a new directory for
mounting the secret, for example, `/etc/app_data/secrets`, so that the mount
path for the secret is `/etc/app_data/secrets/my-secret`.