devops-engineer video for you use Terraform to manage an application deployed to a Google Cloud environment. The application runs on instances deployed by a
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: Error waiting for Deleting Instance Template: The instance_template resource 'project/my-project/global/instanceTemplates/my-it-202201010101010000000001' is already being used by 'projects/my-project/regions/us-central1/instanceGroupManagers/my-mig You need to update the instance template and minimize disruption to the application and the number of pipeline runs. What should you do?