A Cloud Engineer needs to update an existing Google Cloud Deployment Manager deployment named `prod-network` using a revised template configuration file `vpc-config.yaml`. The engineer must first preview the resource modifications without finalizing the deployment, and then apply the previewed changes to update the live environment. Which TWO `gcloud` CLI commands should the engineer execute to complete this workflow?
- Run `gcloud deployment-manager deployments update prod-network --config vpc-config.yaml --preview` to stage and view the proposed resource changes.Answer
- Run `gcloud deployment-manager deployments update prod-network` without specifying the `--config` flag to commit the previewed deployment changes.Answer
- CRun `gcloud deployment-manager deployments plan prod-network --config vpc-config.yaml` to save an execution plan file locally.
- DRun `gcloud services enable deploymentmanager.googleapis.com` in the target project to automatically apply previewed configurations.
Answer
The two required commands are running `gcloud deployment-manager deployments update prod-network --config vpc-config.yaml --preview` to stage the changes, followed by `gcloud deployment-manager deployments update prod-network` to apply the previewed configuration.
To safely preview changes in Google Cloud Deployment Manager, you execute `gcloud deployment-manager deployments update [DEPLOYMENT_NAME] --config [CONFIG_FILE] --preview`. Once verified, executing `gcloud deployment-manager deployments update [DEPLOYMENT_NAME]` without referencing the configuration file applies the staged preview to active resources.
Step-by-Step Solution
Key Concept
Deployment Manager Preview and Update Lifecycle Workflow
Estimated Time:1m 30s