nerdexam
HashiCorpHashiCorp

TA-002-P · Question #218

TA-002-P Question #218: Real Exam Question with Answer & Explanation

The correct answer is B: terraform taint. {"question_number": 6, "question": "Jim wants to destroy and recreate a specific EC2 instance that was manually modified. What is the best way to do it?", "correct_answer": "B", "explanation": "terraform taint marks a specific resource for destruction and recreation on the next t

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

Jim has created several AWS resources from a single terraform configuration file. Someone from his team has manually modified one of the EC2 instance. Now to discard the manual change, Jim wants to destroy and recreate the EC2 instance. What is the best way to do it?

Options

  • Aterraform recreate
  • Bterraform taint
  • Cterraform destroy
  • Dterraform refresh

Explanation

{"question_number": 6, "question": "Jim wants to destroy and recreate a specific EC2 instance that was manually modified. What is the best way to do it?", "correct_answer": "B", "explanation": "terraform taint marks a specific resource for destruction and recreation on the next terraform apply, without affecting other resources. This is the best approach when you want to force-replace just one resource. terraform destroy would destroy ALL resources in the configuration. terraform recreate and terraform refresh are not valid commands for this purpose (refresh only updates state, it does not recreate resources).", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#Terraform CLI#terraform taint#Resource lifecycle#Discarding manual changes

Community Discussion

No community discussion yet for this question.

Full TA-002-P PracticeBrowse All TA-002-P Questions