Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
HashiCorp Certified: Terraform Associate (003) · HashiCorp
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
B. When you want to force Terraform to destroy and recreate a resource on the next apply Using the terraform taint command marks a resource as "tainted," which means that Terraform will destroy and then recreate the resource during the next terraform apply operation. This can be useful if you know that a resource is in a bad state and needs to be replaced.
The answer is B here. But I came across to the other question related to taint and it is important to give attention to the small but Important point: Changes will be applied in the NEXT apply, after you run taint command to mark the resource "as delete".
IMPORTANT NOTE: taint command is deprecated. For Terraform v0.15.2 and later, Hashicorp recommends using the -replace option with terraform apply instead