TA-002-P · Question #118
TA-002-P Question #118: Real Exam Question with Answer & Explanation
The correct answer is C: terraform taint. {"question_number": 2, "question": "Which Terraform command will force a marked resource to be destroyed and recreated on the next apply?", "correct_answer": "C", "explanation": "The terraform taint <resource> command manually marks a resource as 'tainted' in the state file. On t
Question
Which Terraform command will force a marked resource to be destroyed and recreated on the next apply?
Options
- Aterraform fmt
- Bterraform destroy
- Cterraform taint
- Dterraform refresh
Explanation
{"question_number": 2, "question": "Which Terraform command will force a marked resource to be destroyed and recreated on the next apply?", "correct_answer": "C", "explanation": "The terraform taint <resource> command manually marks a resource as 'tainted' in the state file. On the next terraform apply, Terraform will destroy and recreate that resource. This is useful when a resource is in a degraded or unknown state without changing the configuration. terraform fmt (A) only reformats code. terraform destroy (B) destroys all resources, not just one. terraform refresh (D) updates the state file to match real-world infrastructure but does not force recreation. Note: In Terraform v0.15.2+, terraform taint was superseded by terraform apply -replace=<resource>.", "generated_by": "claude-sonnet", "llm_judge_score": 4}
Topics
Community Discussion
No community discussion yet for this question.