O Cloud Deployment Manager vai chegar ao fim do suporte em 31 de dezembro de 2025. Se você usa o Deployment Manager, migre para o Infrastructure Manager ou uma tecnologia de implantação alternativa até 31 de dezembro de 2025 para garantir que seus serviços continuem sem interrupções.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Quando você exclui uma implantação, todos os recursos que fazem parte dela também são excluídos.
Se você quiser excluir recursos específicos da sua implantação e manter o restante, exclua esses recursos do arquivo de configuração e atualize a implantação.
Substitua myproject pelo nome do seu projeto, example-deployment pelo nome da implantação e policy pela política de exclusão, descrita abaixo.
Selecionar uma política de exclusão
A política de exclusão que você usa determina como os recursos na implantação são tratados. É possível usar uma destas políticas:
DELETE[Padrão]: exclui o recurso subjacente. Essa ação é permanente e não pode ser desfeita.
ABANDON: exclui a implantação, mas não exclui os recursos subjacentes. Por exemplo, se você tiver uma instância de VM na implantação, ela ainda estará disponível para você usar depois que a implantação for excluída.
Se você precisar recriar uma implantação excluída, use o arquivo de configuração original. No entanto, ela será considerada uma implantação nova com recursos novos.
[[["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-08-19 UTC."],[[["\u003cp\u003eDeleting a deployment will also delete all resources associated with that deployment, unless an alternative policy is specified.\u003c/p\u003e\n"],["\u003cp\u003eTo delete specific resources while keeping others, modify the configuration file and update the deployment instead of deleting it entirely.\u003c/p\u003e\n"],["\u003cp\u003eIf you want to delete a deployment but keep its underlying resources, you must use the Google Cloud CLI or the API, and use the \u003ccode\u003eABANDON\u003c/code\u003e policy.\u003c/p\u003e\n"],["\u003cp\u003eThe default delete policy, \u003ccode\u003eDELETE\u003c/code\u003e, permanently removes the underlying resources when a deployment is deleted, and this action cannot be reversed.\u003c/p\u003e\n"],["\u003cp\u003eWhile a deleted deployment's configuration can be reused, it will create an entirely new deployment with new resources.\u003c/p\u003e\n"]]],[],null,["# Deleting deployments\n\nWhen you delete a deployment, all resources that are part of the deployment are\nalso deleted.\n\nIf you want to delete specific resources from your deployment and keep the rest,\ndelete those resources from your configuration file, and\n[update the deployment](/deployment-manager/docs/deployments/updating-deployments)\ninstead.\n\nBefore you begin\n----------------\n\n- If you want to use the command-line examples in this guide, install the [\\`gcloud\\` command-line tool](/sdk).\n- If you want to use the API examples in this guide, set up [API access](/deployment-manager/docs/reference/latest).\n\nDeleting deployments\n--------------------\n\n| **Warning:** You cannot undo this operation.\n\nIf you want to delete a deployment, but keep all the underlying resources, you\nmust use the Google Cloud CLI or the API. \n\n### Console\n\n1. In the Google Cloud console, open the Deployments page. \n [Go to the Deployments page](https://console.cloud.google.com/project/_/deployments)\n2. In the list of deployments, select the check boxes for the deployments that you want to delete.\n3. On the top of the page, click **Delete**.\n\n### gcloud\n\nWith `gcloud`, use the `deployments delete` command:\n\n\u003cbr /\u003e\n\n```\n gcloud deployment-manager deployments delete example-deployment --delete-policy=POLICY\n \n```\n\n\u003cbr /\u003e\n\nWhere \u003cvar translate=\"no\"\u003ePOLICY\u003c/var\u003e is the [delete policy](#delete-policy).\n\n`gcloud` returns a response similar to the following: \n\n```\nWaiting for delete operation operation-1415233139561-2d5dd654-f438-4d15-87e3-4b5b8ca68c5d to complete...done.\nDelete operation operation-1415233139561-2d5dd654-f438-4d15-87e3-4b5b8ca68c5d completed successfully.\nendTime: '2014-11-05T16:19:03.253-08:00'\nid: '5642095755656583573'\nname: operation-1415233139561-2d5dd654-f438-4d15-87e3-4b5b8ca68c5d\noperationType: delete\nstartTime: '2014-11-05T16:19:02.669-08:00'\nstatus: DONE\ntargetLink: https://www.googleapis.com/deploymentmanager/v2beta1/projects/myproject/global/deployments/example-deployment\n```\n\n### API\n\nIn the API, provide an empty `DELETE` request to the following URL: \n\n```\nDELETE https://www.googleapis.com/deploymentmanager/v2beta1/projects/myproject/global/deployments/example-deployment?deletePolicy=policy\n```\n\nReplace `myproject` with the name of your project, `example-deployment`\nwith the name of the deployment, and `policy` with the delete policy,\ndescribed below.\n\nSelect a delete policy\n----------------------\n\nThe delete policy you use determines how the resources in the deployment\nare handled. You can use one of these policies:\n\n- `DELETE` **\\[Default\\]**: Deletes the underlying resource. This is\n permanent and cannot be undone.\n\n- `ABANDON`: This deletes the deployment, but does not delete the\n underlying resources. For example, if you have a VM instance in the\n deployment, it will still be available for you to use after the\n deployment is deleted.\n\nIf you need to re-create a deployment that you deleted, you can use the original\nconfiguration file. However, the deployment is considered a new deployment, with new resources."]]