nerdexam
HashiCorpHashiCorp

TA-002-P · Question #205

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

The correct answer is A: terraform taint. {"question_number": 10, "question": "What command forces the recreation of a resource for side effects not visible in resource attributes?", "correct_answer": "A", "explanation": "terraform taint marks a specific resource instance in the state file as 'tainted,' meaning it is fla

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

Question

Forcing the recreation of a resource is useful when you want a certain side effect of recreation that is not visible in the attributes of a resource. What command will do this?

Options

  • Aterraform taint
  • Bterraform apply
  • Cterraform graph
  • Dterraform refresh

Explanation

{"question_number": 10, "question": "What command forces the recreation of a resource for side effects not visible in resource attributes?", "correct_answer": "A", "explanation": "terraform taint marks a specific resource instance in the state file as 'tainted,' meaning it is flagged for destruction and recreation on the next terraform apply. This is useful when a resource's visible attributes are correct but some out-of-band state (e.g., a corrupted VM disk, an expired certificate, a misconfigured bootstrapping script) needs to be reset by reprovisioning. Note: as of Terraform v0.15.2+, terraform taint is deprecated in favor of terraform apply -replace=<resource_address>, which achieves the same result more directly. For exam purposes, terraform taint remains the classic answer. The other options (apply, graph, refresh) do not force recreation.", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#terraform taint#resource recreation#CLI commands#resource lifecycle

Community Discussion

No community discussion yet for this question.

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