New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Cloud DevOps Engineer Exam - Topic 5 Question 82 Discussion

Actual exam question for Google's Professional Cloud DevOps Engineer exam
Question #: 82
Topic #: 5
[All Professional Cloud DevOps Engineer Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Gene
3 months ago
I think C is a bit risky, reimporting can be tricky.
upvoted 0 times
...
Tula
3 months ago
Definitely not A, that would cause too much downtime.
upvoted 0 times
...
Ashley
4 months ago
Surprised that deleting the managed instance group is even an option.
upvoted 0 times
...
Kimberely
4 months ago
I disagree, option D could work too!
upvoted 0 times
...
Walker
4 months ago
Option B seems like the best choice to minimize disruption.
upvoted 0 times
...
Mila
4 months ago
I’m a bit confused about the terraform state file. Is option C really necessary, or can we just update the instance template directly?
upvoted 0 times
...
Audria
5 months ago
I feel like I saw a question similar to this in our practice tests, but I can't recall if we discussed the lifecycle block in detail.
upvoted 0 times
...
Arlyne
5 months ago
I think adding a new instance template and updating the managed instance group is a common practice. It seems like option B might be the right choice.
upvoted 0 times
...
Dominque
5 months ago
I remember something about updating instance templates without deleting the managed instance group, but I'm not sure which option does that.
upvoted 0 times
...
Jerry
5 months ago
The create_before_destroy option seems promising. That could allow me to update the instance template without causing issues with the pipeline. I'll definitely consider that one.
upvoted 0 times
...
Arlie
5 months ago
Removing the managed instance group from the Terraform state and reimporting it - that's an interesting idea. I'll need to make sure I understand the implications of that approach.
upvoted 0 times
...
Jame
5 months ago
Ah, I see. Adding a new instance template and updating the managed instance group could work, but I'm not sure if that's the most efficient approach. Let me think this through.
upvoted 0 times
...
Macy
5 months ago
Hmm, deleting the managed instance group seems risky - that could cause significant downtime. I'm leaning towards one of the other options that minimizes disruption.
upvoted 0 times
...
Helga
5 months ago
This looks like a tricky one. I'll need to carefully review the options and think through the potential impact on the application and pipeline.
upvoted 0 times
...
Vallie
10 months ago
I'm just glad I'm not the one who has to figure this out on a production system. Can you imagine the angry calls from the users if we botch this update?
upvoted 0 times
Billye
9 months ago
That sounds like a good plan. We can also monitor the application during the update to ensure everything is running smoothly.
upvoted 0 times
...
Alonso
9 months ago
Then we can gradually replace the instances in the group with the new template to minimize disruption.
upvoted 0 times
...
Viva
9 months ago
We should create a new instance template with the updated machine type and update the managed instance group to use the new template.
upvoted 0 times
...
...
James
10 months ago
Haha, I bet the Terraform maintainers had a good laugh when they came up with that `create_before_destroy` meta-argument. Looks like that might be the way to go here, though I'd want to test it out first.
upvoted 0 times
Evette
9 months ago
Agreed. Let's make sure to test it thoroughly to minimize any potential issues with the pipeline.
upvoted 0 times
...
Leota
9 months ago
That sounds like a good idea. We should definitely test it out first before making any changes.
upvoted 0 times
...
Shoshana
10 months ago
We could try using the `create_before_destroy` meta-argument to update the instance template without disrupting the application.
upvoted 0 times
...
...
Fannie
10 months ago
Wait, so we can't just delete the managed instance group and recreate it? That seems like the simplest solution, but I guess it could cause downtime. Gotta love Terraform's idempotency!
upvoted 0 times
Pok
9 months ago
Deleting and recreating the managed instance group could work, but it might cause downtime for the application.
upvoted 0 times
...
Darci
9 months ago
Another option is to manually update the instance template and then trigger a rolling update on the managed instance group.
upvoted 0 times
...
Dortha
10 months ago
You could create a new instance template with the updated machine type and then update the managed instance group to use the new template.
upvoted 0 times
...
...
Filiberto
11 months ago
Ah, I see. The key here is to minimize disruption to the application while updating the instance template. I think option B might be the best approach, but I'll need to double-check the details.
upvoted 0 times
Marjory
10 months ago
User 2: Yeah, I agree. Updating the managed instance group to use the new instance template and then deleting the old one sounds like a good plan.
upvoted 0 times
...
Ceola
10 months ago
User 1: I think option B is the way to go. It seems like the least disruptive option.
upvoted 0 times
...
...
Jose
11 months ago
Why do you think D is the correct answer?
upvoted 0 times
...
Elbert
11 months ago
Hmm, this is a tricky one. I'm not sure I fully understand the issue with the instance template change causing the pipeline to fail. I'll need to carefully read through the options and think this through.
upvoted 0 times
Jame
9 months ago
Definitely, we need to ensure that the application continues to run smoothly while updating the instance template.
upvoted 0 times
...
Joseph
10 months ago
That makes sense, it's important to minimize disruption when making changes to the infrastructure.
upvoted 0 times
...
Theresia
10 months ago
I agree, adding a new instance template and updating the managed instance group seems like the least disruptive option.
upvoted 0 times
...
Lera
10 months ago
Option B seems like the best approach to update the instance template without disrupting the application.
upvoted 0 times
...
...
Val
11 months ago
I disagree, I believe the correct answer is D.
upvoted 0 times
...
Jose
11 months ago
I think the answer is B.
upvoted 0 times
...

Save Cancel