BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Exam Terraform-Associate-003 Topic 4 Question 21 Discussion

Actual exam question for HashiCorp's Terraform-Associate-003 exam
Question #: 21
Topic #: 4
[All Terraform-Associate-003 Questions]

Why would you use the -replace flag for terraform apply?

Show Suggested Answer Hide Answer
Suggested Answer: D

The -replace flag is used with the terraform apply command when there is a need to explicitly force Terraform to destroy and then recreate a specific resource during the next apply. This can be necessary in situations where a simple update is insufficient or when a resource must be re-provisioned to pick up certain changes.


Contribute your Thoughts:

Monte
2 months ago
I heard the -replace flag is short for 'replace your entire infrastructure with a single command'. Maybe option B is the secret hidden feature?
upvoted 0 times
Loreta
14 days ago
I heard that option B is actually the correct answer.
upvoted 0 times
...
Iesha
18 days ago
I'm pretty sure it's option D.
upvoted 0 times
...
Kassandra
22 days ago
No, I believe option C is the right choice.
upvoted 0 times
...
Ashton
29 days ago
I think option D is the correct answer.
upvoted 0 times
...
...
Nettie
2 months ago
Wait, did someone say 'destroy all the infrastructure'? That's one way to clear up your Terraform workspace!
upvoted 0 times
...
Daren
2 months ago
This question is a piece of cake! D is the only option that makes sense for the -replace flag.
upvoted 0 times
...
Yasuko
2 months ago
C) Destroying a resource? Nah, that's too extreme. I think D is the way to go here.
upvoted 0 times
Cary
20 days ago
Definitely, it's a useful feature for managing infrastructure changes.
upvoted 0 times
...
Arletta
23 days ago
Yeah, it's a good way to ensure everything is updated correctly.
upvoted 0 times
...
Dominga
1 months ago
I agree, destroying and recreating a resource seems like the best option.
upvoted 0 times
...
...
Lucia
2 months ago
It could be, but it depends on the specific requirements of the infrastructure.
upvoted 0 times
...
Hollis
2 months ago
A) What? Ignoring a resource? That's not what the -replace flag is for. Clearly, the answer is D.
upvoted 0 times
...
Derick
2 months ago
D) Seems like the right choice to me. Forcing Terraform to destroy and recreate a resource is exactly what the -replace flag is for.
upvoted 0 times
Talia
1 months ago
D) You want to force Terraform to destroy and recreate a resource on the next apply
upvoted 0 times
...
Anglea
2 months ago
A) You want Terraform to ignore a resource on the next apply
upvoted 0 times
...
...
Delisa
2 months ago
But wouldn't destroying and recreating a resource be more efficient in some cases?
upvoted 0 times
...
Lucia
3 months ago
I disagree, I believe the answer is C. -replace flag is used to force Terraform to destroy a resource.
upvoted 0 times
...
Delisa
3 months ago
I think the answer is D. You use -replace flag to destroy and recreate a resource.
upvoted 0 times
...

Save Cancel