Examtopics

Professional Cloud DevOps Engineer
  • Topic 1 Question 115

    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?

    • Delete the managed instance group, and recreate it after updating the instance template.

    • Add a new instance template, update the managed instance group to use the new instance template, and delete the old instance template.

    • Remove the managed instance group from the Terraform state file, update the instance template, and reimport the managed instance group.

    • Set the create_before_destroy meta-argument to true in the lifecycle block on the instance template.


    シャッフルモード