
Answer-first summary for fast verification
Answer: Run `gcloud deployment-manager deployments update --preview`
## Explanation **Correct Answer: C) Run `gcloud deployment-manager deployments update --preview`** ### Why this is correct: 1. **Preview mode**: The `--preview` flag in Deployment Manager allows you to validate your template changes without actually applying them. This is specifically designed for testing and validation purposes. 2. **Dependency validation**: When you run a preview, Deployment Manager analyzes the template, validates all dependencies between resources, and shows you what changes would be made without actually making those changes. 3. **Safety**: This approach is safe because no resources are actually created, modified, or deleted during the preview. ### Why other options are incorrect: **A) Manually review all resources**: - While manual review is good practice, it's error-prone and doesn't provide the same level of validation as automated dependency checking. - Complex templates with many dependencies are difficult to validate manually. **B) Deploy to a staging project**: - This would actually apply the changes, which is not what you want when you only want to validate dependencies. - It's more time-consuming and resource-intensive than using preview mode. **D) Export the template to YAML**: - Exporting to YAML just changes the format but doesn't validate dependencies or check for errors in the template. - This doesn't provide any validation of the template's correctness or dependency relationships. ### Best Practice Tip: Always use `--preview` flag when making significant changes to Deployment Manager templates. This allows you to: - Validate syntax and structure - Check resource dependencies - See what changes would be made - Identify potential issues before actual deployment Command example: ```bash gcloud deployment-manager deployments update [DEPLOYMENT_NAME] --config [CONFIG_FILE] --preview ```
Author: Rodrigo Sales
Ultimate access to all questions.
No comments yet.
You significantly changed a complex Deployment Manager template and want to validate dependencies without applying changes. What should you do?
A
Manually review all resources
B
Deploy to a staging project
C
Run gcloud deployment-manager deployments update --preview
D
Export the template to YAML