Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 325 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 325
Topic #: 1
[All Terraform Associate Questions]

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

  • A. You want to force Terraform to destroy a resource on the next apply
  • B. You want Terraform to ignore a resource on the next apply
  • C. You want to force Terraform to destroy and recreate a resource on the next apply
  • D. You want Terraform to destroy all the infrastructure in your workspace
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
SilentH
6 months, 2 weeks ago
Selected Answer: C
C is the answer. The full syntax is "terraform apply -replace=[ADDRESS]" Instructs Terraform to plan to replace the resource instance with the given address. This is helpful when one or more remote objects have become degraded, and you can use replacement objects with the same configuration to align with immutable infrastructure patterns. You cannot use -replace with the -destroy option, and it is only available from Terraform v0.15.2 onwards. For earlier versions, use terraform taint to achieve a similar result. https://developer.hashicorp.com/terraform/cli/commands/plan#planning-options
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...