Valid Professional-Cloud-DevOps-Engineer Dumps shared by ExamDiscuss.com for Helping Passing Professional-Cloud-DevOps-Engineer Exam! ExamDiscuss.com now offer the newest Professional-Cloud-DevOps-Engineer exam dumps, the ExamDiscuss.com Professional-Cloud-DevOps-Engineer exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com Professional-Cloud-DevOps-Engineer dumps with Test Engine here:
You use Terraform to manage an application deployed to a Google Cloud environment The application runs on instances deployed by a managed instance group The Terraform code is deployed by using a CI/CD pipeline When you change the machine type on the instance template used by the managed instance group, the pipeline fails at the terraform apply stage with the following error message You need to update the instance template and minimize disruption to the application and the number of pipeline runs What should you do?
Correct Answer: D
The best option for updating the instance template and minimizing disruption to the application and the number of pipeline runs is to set the create_before_destroy meta-argument to true in the lifecycle block on the instance template. The create_before_destroy meta-argument is a Terraform feature that specifies that a new resource should be created before destroying an existing one during an update. This way, you can avoid downtime and errors when updating a resource that is in use by another resource, such as an instance template that is used by a managed instance group. By setting the create_before_destroy meta-argument to true in the lifecycle block on the instance template, you can ensure that Terraform creates a new instance template with the updated machine type, updates the managed instance group to use the new instance template, and then deletes the old instance template.