ExamGecko
Question list
Search
Search

Question 119 - Terraform Associate 003 discussion

Report
Export

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?

A.
Use the terraform state rm command to remove the VM from state file
Answers
A.
Use the terraform state rm command to remove the VM from state file
B.
Use the terraform taint command targeting the VMs then run terraform plan and terraform apply
Answers
B.
Use the terraform taint command targeting the VMs then run terraform plan and terraform apply
C.
Use the terraform apply command targeting the VM resources only
Answers
C.
Use the terraform apply command targeting the VM resources only
D.
Delete the Terraform VM resources from your Terraform code then run terraform plan and terraform apply
Answers
D.
Delete the Terraform VM resources from your Terraform code then run terraform plan and terraform apply
Suggested answer: B

Explanation:

The terraform taint command marks a resource as tainted, which means it will be destroyed and recreated on the next apply. This way, you can replace the VM instance without affecting the database or other resources.Reference= [Terraform Taint]

asked 18/09/2024
Neville Raposo
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first