Check the dependencies of a Deployment Manager template for proper validation.

Ensure Dependency Validation for Deployment Manager Template

Question

You significantly changed a complex Deployment Manager template and want to confirm that the dependencies of all defined resources are properly met before committing it to the project.

You want the most rapid feedback on your changes.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D.

https://cloud.google.com/deployment-manager/docs/deployments/updating-deployments

If you significantly changed a complex Deployment Manager template and want to confirm that the dependencies of all defined resources are properly met before committing it to the project, the most rapid feedback option would be to execute the Deployment Manager template using the "-preview" option in the same project and observe the state of interdependent resources.

Option A, using granular logging statements within a Deployment Manager template authored in Python, may help you debug and troubleshoot specific issues in the template, but it does not provide a quick way to validate the dependencies of all defined resources.

Option B, monitoring the activity of the Deployment Manager execution on the Stackdriver Logging page of the GCP Console, is useful for gaining insights into the execution of a Deployment Manager template, but it may not provide an immediate feedback on the state of interdependent resources.

Option C, executing the Deployment Manager template against a separate project with the same configuration, and monitoring for failures, is a valid approach to test the template, but it may take longer to set up and execute, and may not provide an immediate feedback on the state of interdependent resources.

Therefore, the best option is D, executing the Deployment Manager template using the "-preview" option in the same project, and observing the state of interdependent resources. The "-preview" option allows you to execute a Deployment Manager template without actually deploying any resources, and provides a preview of the changes that would be made if the template were deployed. This way, you can quickly validate the dependencies of all defined resources, and make any necessary changes before committing the template to the project.