HashiCorpHashiCorp
TA-002-P · Question #376
TA-002-P Question #376: Real Exam Question with Answer & Explanation
Sign in or unlock TA-002-P to reveal the answer and full explanation for question #376. The question stem and answer options stay visible for context.
Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Question
You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database. What is the best way to achieve this using Terraform?
Options
- AUse the Terraform taint command targeting the VMs then run Terraform plan and Terraform apply
- BDelete the Terraform VM resources from your Terraform code then run Terraform plan and
- CUse the terraform apply command targeting the VM resources only
- DUse the terraform state rm command to remove the VM from state file
Unlock TA-002-P to see the answer
You've previewed enough free TA-002-P questions. Unlock TA-002-P for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#Terraform CLI#Resource lifecycle#terraform taint#Resource replacement