When running terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

When running terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.

Explanation:
Taint marks a resource as tainted in the state, signaling that it must be replaced. The destruction and recreation occur during the next terraform apply, not at the moment you run taint. If you run apply after taint (or in the same workflow), you’ll see Terraform plan a destroy followed by a recreate for that resource, but the key point is that taint itself is just a state flag, not an immediate action. So the correct understanding is that taint schedules a replacement on the next apply, not an immediate destruction.

Taint marks a resource as tainted in the state, signaling that it must be replaced. The destruction and recreation occur during the next terraform apply, not at the moment you run taint. If you run apply after taint (or in the same workflow), you’ll see Terraform plan a destroy followed by a recreate for that resource, but the key point is that taint itself is just a state flag, not an immediate action. So the correct understanding is that taint schedules a replacement on the next apply, not an immediate destruction.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy