gcloud beta deployment-manager deployments update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta deployment-manager deployments update - update a deployment based on a provided config file
- SYNOPSIS
gcloud beta deployment-manager deployments updateDEPLOYMENT_NAME[--async][--create-policy=CREATE_POLICY; default="create-or-acquire"][--delete-policy=DELETE_POLICY; default="delete"][--description=DESCRIPTION][--fingerprint=FINGERPRINT][--preview][--properties=[PROPERTIES,…]][--remove-labels=[KEY,…]][--update-labels=[KEY=VALUE,…]][--composite-type=COMPOSITE_TYPE|--config=CONFIG|--manifest-id=MANIFEST_ID|--template=TEMPLATE][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)This command will update a deployment with the new configfile provided. Different policies for create, update, and delete policies can bespecified.- EXAMPLES
- To update an existing deployment with a new config YAML file, run:
gcloudbetadeployment-managerdeploymentsupdatemy-deployment--config=new_config.yamlTo update an existing deployment with a new config template file, run:
gcloudbetadeployment-managerdeploymentsupdatemy-deployment--template=new_config.{jinja|py}To update an existing deployment with a composite type as a new config, run:
To preview an update to an existing deployment without actually modifying theresources, run:gcloudbetadeployment-managerdeploymentsupdatemy-deployment--composite-type=<project-id>/composite:<new-config>gcloudbetadeployment-managerdeploymentsupdatemy-deployment--config=new_config.yaml--previewTo apply an update that has been previewed, provide the name of the previeweddeployment, and no config file:
gcloudbetadeployment-managerdeploymentsupdatemy-deploymentTo specify different create, update, or delete policies, include any subset ofthe following flags:
gcloudbetadeployment-managerdeploymentsupdatemy-deployment--config=new_config.yaml--create-policy=acquire--delete-policy=abandonTo perform an update without waiting for the operation to complete, run:
gcloudbetadeployment-managerdeploymentsupdatemy-deployment--config=new_config.yaml--asyncTo update an existing deployment with a new config file and a fingerprint, run:
gcloudbetadeployment-managerdeploymentsupdatemy-deployment--config=new_config.yaml--fingerprint=deployment-fingerprintEither the
--config,--template, or--composite-typeflag is required unless launching analready-previewed update to a deployment. If you want to update a deployment'smetadata, such as the labels or description, you must run a separate commandwith--update-labels,--remove-labels, or--description, as applicable.More information is available athttps://cloud.google.com/deployment-manager/docs/deployments/updating-deployments.
- POSITIONAL ARGUMENTS
DEPLOYMENT_NAME- Deployment name.
- FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--create-policy=CREATE_POLICY; default="create-or-acquire"- Create policy for resources that have changed in the update.
CREATE_POLICYmust be one of:acquire,create,create-or-acquire. --delete-policy=DELETE_POLICY; default="delete"- Delete policy for resources that will change as part of an update or delete.
deletedeletes the resource whileabandonjust removesthe resource reference from the deployment.DELETE_POLICYmust be one of:abandon,delete. --description=DESCRIPTION- The new description of the deployment.
--fingerprint=FINGERPRINT- The fingerprint to use in requests to modify a deployment. If not specified, aget deployment request will be made to fetch the latest fingerprint. Afingerprint is a randomly generated value that is part of the update, stop, andcancel-preview request to perform optimistic locking. It is initially generatedby Deployment Manager and changes after every request to modify data. The latestfingerprint is printed when deployment data is modified.
--preview- Preview the requested update without making any changes to the underlyingresources. (default=False)
--properties=[PROPERTIES,…]- A comma separated, key:value, map to be used when deploying a template file orcomposite type directly.
--remove-labels=[KEY,…]- List of label keys to remove. If a label does not exist it is silently ignored.If
--update-labelsis also specified then--update-labelsis applied first. --update-labels=[KEY=VALUE,…]- List of label KEY=VALUE pairs to update. If a label exists, its value ismodified. Otherwise, a new label is created.
Keys must start with a lowercase character and contain only hyphens(
-), underscores (_), lowercase characters, andnumbers. Values must contain only hyphens (-), underscores(_), lowercase characters, and numbers. - At most one of these can be specified:
--composite-type=COMPOSITE_TYPE- Name of a composite type to deploy. For an example of creating and deploying acomposite type, see:https://cloud.google.com/deployment-manager/docs/configuration/templates/create-composite-types#examplecompositetype
--config=CONFIG- Filename of a top-level yaml config that specifies resources to deploy. For aguide to creating a configuration, refer tohttps://cloud.google.com/deployment-manager/docs/configuration/create-basic-configuration
--manifest-id=MANIFEST_ID- Manifest Id of a previous deployment. This flag cannot be used with --config.
--template=TEMPLATE- Filename of a top-level jinja or python config template.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gclouddeployment-managerdeploymentsupdategcloudalphadeployment-managerdeploymentsupdate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.