Description (services)

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.

Set or modify a description

You can set a description on Cloud Run services.

Command line

You can set or update the description during deployment:

gcloud run deploy SERVICE --description DESCRIPTION

Replace

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

YAML

You can download and view existing service configurations using the gcloud run services describe --format export command, which yields cleaned results in YAML format. You can then modify the fields described below and upload the modified YAML using the gcloud run services replace command. Make sure you only modify fields as documented.

  1. To view and download the configuration:

    gcloud run services describe SERVICE --format export > 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. Replace the service with its new configuration using the following command:

    gcloud run services replace service.yaml

Terraform

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

The following google_cloud_run_v2_service resource specifies a description. Replace the description with your desired value.

resource "google_cloud_run_v2_service" "default" {
  name     = "cloudrun-service-description"
  location = "us-central1"

  description = "This service has a custom description"

  template {
    containers {
      image = "us-docker.pkg.dev/cloudrun/container/hello"
    }
  }

}