Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, mostramos como definir uma descrição personalizada nos serviços do
Cloud Run.
A descrição é um texto legível opcional anexado ao serviço.
A descrição é limitada a 512 caracteres.
Se presente, a descrição é exibida durante a visualização de detalhes de um serviço usando gcloud run services describe.
Funções exigidas
Para receber as permissões necessárias para configurar e implantar os serviços do Cloud Run,
peça ao administrador para conceder a você os
seguintes papéis do IAM:
Se você estiver implantando um serviço
ou uma função do código-fonte, também
precisará ter outros papéis concedidos a você no projeto e na
conta de serviço do Cloud Build.
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 productiontemplate{containers{image="us-docker.pkg.dev/cloudrun/container/hello"}}}
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[],[],null,["# Set service descriptions\n\nThis page shows how to set a custom description on your Cloud Run\nservices.\nA description is an optional human-readable text attached to the service.\nA description is limited to 512 characters.\nIf present, the description is displayed when\n[viewing details of a service using `gcloud run services describe`](/run/docs/managing/services#command-line_1).\n\nRequired roles\n--------------\n\n\nTo get the permissions that\nyou need to configure and deploy Cloud Run services,\n\nask your administrator to grant you the\nfollowing IAM roles:\n\n- [Cloud Run Developer](/iam/docs/roles-permissions/run#run.developer) (`roles/run.developer`) on the Cloud Run service\n- [Service Account User](/iam/docs/roles-permissions/iam#iam.serviceAccountUser) (`roles/iam.serviceAccountUser`) on the service identity\n\n\nIf you are deploying a [service](/run/docs/deploying-source-code#required_roles)\nor [function](/run/docs/deploy-functions#required-roles) from source code, you\nmust also have additional roles granted to you on your project and\nCloud Build service account.\n\nFor a list of IAM roles and permissions that are associated with\nCloud Run, see\n[Cloud Run IAM roles](/run/docs/reference/iam/roles)\nand [Cloud Run IAM permissions](/run/docs/reference/iam/permissions).\nIf your Cloud Run service interfaces with\nGoogle Cloud APIs, such as Cloud Client Libraries, see the\n[service identity configuration guide](/run/docs/configuring/services/service-identity).\nFor more information about granting roles, see\n[deployment permissions](/run/docs/reference/iam/roles#additional-configuration)\nand [manage access](/iam/docs/granting-changing-revoking-access).\n\nSet or modify a description\n---------------------------\n\nYou can set a description on Cloud Run services. \n\n### gcloud\n\nYou can set or update the description during [deployment](/run/docs/deploying#service):\n\n\u003cbr /\u003e\n\n```bash\ngcloud run deploy SERVICE --description DESCRIPTION\n```\n\n\u003cbr /\u003e\n\nReplace\n\n- \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e with name of your Cloud Run service\n- \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e with the description of the service\n\n### YAML\n\n1. If you are creating a new service, skip this step.\n If you are updating an existing service, download its [YAML configuration](/run/docs/reference/yaml/v1):\n\n ```bash\n gcloud run services describe SERVICE --format export \u003e service.yaml\n ```\n2. Update the `run.googleapis.com/description` annotation:\n\n ```yaml\n apiVersion: serving.knative.dev/v1\n kind: Service\n metadata:\n name: SERVICE\n annotations:\n run.googleapis.com/description: \"\u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e\"\n spec:\n template:\n ...\n ```\n\n Replace\n - \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e with the name of your Cloud Run service\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e with the description of the service\n3. Create or update the service using the following command:\n\n ```bash\n gcloud run services replace service.yaml\n ```\n\n### Terraform\n\n\nTo learn how to apply or remove a Terraform configuration, see\n[Basic Terraform commands](/docs/terraform/basic-commands).\nAdd the following to a [`google_cloud_run_v2_service`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service) resource in your Terraform configuration: \n\n\u003cbr /\u003e\n\n resource \"google_cloud_run_v2_service\" \"default\" {\n name = \"cloudrun-service-description\"\n location = \"us-central1\"\n\n description = \"This service has a custom description\"\n\n deletion_protection = false # set to \"true\" in production\n\n template {\n containers {\n image = \"us-docker.pkg.dev/cloudrun/container/hello\"\n }\n }\n\n }\n\nReplace the description with your desired value."]]