Set service descriptions

This page shows how to set a custom description on your Cloud Run services. A description is an optional human-readable text attached to the service. A description is limited to 512 characters. If present, the description is displayed when viewing details of a service using gcloud run services describe.

Required roles

To get the permissions that you need to configure and deploy Cloud Run services, ask your administrator to grant you the following IAM roles:

If you are deploying a service or function from source code, you must also have additional roles granted to you on your project and Cloud Build service account.

For a list of IAM roles and permissions that are associated with Cloud Run, see Cloud Run IAM roles and Cloud Run IAM permissions. If your Cloud Run service interfaces with Google Cloud APIs, such as Cloud Client Libraries, see the service identity configuration guide. For more information about granting roles, see deployment permissions and manage access.

Set or modify a description

You can set a description on Cloud Run services.

gcloud

You can set or update the description during deployment:

gcloudrundeploySERVICE--descriptionDESCRIPTION

Replace

  • SERVICE with name of your Cloud Run service
  • DESCRIPTION with the description of the service

YAML

  1. If you are creating a new service, skip this step. If you are updating an existing service, download its YAML configuration:

    gcloudrunservicesdescribeSERVICE--formatexport>service.yaml
  2. Update the run.googleapis.com/description annotation:

    apiVersion:serving.knative.dev/v1
    kind:Service
    metadata:
    name:SERVICE
    annotations:
    run.googleapis.com/description:"DESCRIPTION"
    spec:
    template:
    ...

    Replace

    • SERVICE with the name of your Cloud Run service
    • DESCRIPTION with the description of the service
  3. Create or update the service using the following command:

    gcloudrunservicesreplaceservice.yaml

Terraform

To learn how to apply or remove a Terraform configuration, see Basic Terraform commands.

Add the following to a google_cloud_run_v2_service resource in your Terraform configuration:

resource"google_cloud_run_v2_service""default"{
name="cloudrun-service-description"
location="us-central1"
description="This service has a custom description"
deletion_protection=false # set to "true" in production
template{
containers{
image="us-docker.pkg.dev/cloudrun/container/hello"
}
}
}

Replace the description with your desired value.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.