HashiCorp Certified: Terraform Associate — Question 35

Why would you use the terraform taint command?

Answer options

Correct answer: B

Explanation

The correct answer is B because the terraform taint command marks a resource for recreation during the next apply, ensuring that it is destroyed and then recreated. Option A is incorrect as it only mentions destruction without recreation. Option C is wrong since it describes ignoring a resource rather than recreating it. Option D misrepresents the command's function by suggesting it would destroy all infrastructure, which is not the case.