gcloud_deployment-manager_deployments_update (1)
NAME
- gcloud deployment-manager deployments update - update a deployment based on a provided config file
SYNOPSIS
-
gcloud deployment-manager deployments update DEPLOYMENT_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 | --template=TEMPLATE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
POSITIONAL ARGUMENTS
-
- DEPLOYMENT_NAME
-
Deployment name.
FLAGS
-
- --async
-
Return immediately and print information about the Operation in progress rather
than waiting for the Operation to complete. (default=False)
- --create-policy=CREATE_POLICY; default="create-or-acquire"
-
Create policy for resources that have changed in the update. CREATE_POLICY
must be one of: acquire, create-or-acquire.
- --delete-policy=DELETE_POLICY; default="delete"
-
Delete policy for resources that will change as part of an update or delete.
delete deletes the resource while abandon just removes the resource
reference from the deployment. DELETE_POLICY must 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, a
get deployment request will be made to fetch the latest fingerprint. A
fingerprint is a randomly generated value that is part of the update, stop, and
cancel-preview request to perform optimistic locking. It is initially generated
by Deployment Manager and changes after every request to modify data. The latest
fingerprint is printed when deployment data is modified.
- --preview
-
Preview the requested update without making any changes to theunderlying
resources. (default=False)
- --properties=[PROPERTIES,...]
-
A comma separated, key:value, map to be used when deploying a template file or
composite type directly.
- --remove-labels=[KEY,...]
-
List of label keys to remove. If a label does not exist it is silently ignored.
- --update-labels=[KEY=VALUE,...]
-
List of label KEY=VALUE pairs to update. If a label exists its value is
modified, otherwise a new label is created.
Keys must start with a lowercase character and contain only hyphens (-), underscores (_), lowercase characters, and numbers. Values must contain only hyphens (-), underscores (_), lowercase characters, and numbers.
-
At most one of these may be specified:
-
- --composite-type=COMPOSITE_TYPE
-
Name of a composite type to deploy.
- --config=CONFIG
-
Filename of a top-level yaml config that specifies resources to deploy.
- --template=TEMPLATE
-
Filename of a top-level jinja or python config template.
-
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To update an existing deployment with a new config yaml file, run:
-
$ gcloud deployment-manager deployments update my-deployment \
--config new_config.yaml
To update an existing deployment with a new config template file, run:
-
$ gcloud deployment-manager deployments update my-deployment \
--template new_config.{jinja|py}
To update an existing deployment with a composite type as a new config, run:
-
$ gcloud deployment-manager deployments update my-deployment \
--composite-type <project-id>/composite:<new-config>
To preview an update to an existing deployment without actually modifying the resources, run:
-
$ gcloud deployment-manager deployments update my-deployment \
--config new_config.yaml --preview
To apply an update that has been previewed, provide the name of the previewed deployment, and no config file:
- $ gcloud deployment-manager deployments update my-deployment
To specify different create, update, or delete policies, include any subset of the following flags;
-
$ gcloud deployment-manager deployments update my-deployment \
--config new_config.yaml --create-policy acquire \
--delete-policy abandon
To perform an update without waiting for the operation to complete, run:
-
$ gcloud deployment-manager deployments update my-deployment \
--config new_config.yaml --async
To update an existing deployment with a new config file and a fingerprint, run:
-
$ gcloud deployment-manager deployments update my-deployment \
--config new_config.yaml --fingerprint deployment-fingerprint
Either the --config, --template, or --composite-type flag is required unless launching an already-previewed update to a deployment.
More information is available at cloud.google.com/deployment-manager/docs/configuration
NOTES
These variants are also available:
- $ gcloud alpha deployment-manager deployments update $ gcloud beta deployment-manager deployments update