Exam Terraform-Associate-004 Topic 1 Question 54 Discussion
Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 54
Topic #: 1
Question #: 54
Topic #: 1
You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully.
What will happen if you delete the VM using the cloud provider console, then run terraform apply again without changing any Terraform code?
What will happen if you delete the VM using the cloud provider console, then run terraform apply again without changing any Terraform code?
Suggested Answer: A Vote an answer
Rationale for Correct answer:Terraform detects drift by refreshing state during terraform apply. Since the VM no longer exists but is still declared in configuration, Terraform will plan and recreate the missing resource.
Analysis of Incorrect Options (Distractors):
B . Error: Terraform treats this as drift, not an error.
C . Remove from state: Terraform does not remove resources automatically unless instructed.
D . No changes: Incorrect because drift is detected and corrected.
Key Concept:Terraform enforces the desired state defined in configuration, correcting drift automatically.
Analysis of Incorrect Options (Distractors):
B . Error: Terraform treats this as drift, not an error.
C . Remove from state: Terraform does not remove resources automatically unless instructed.
D . No changes: Incorrect because drift is detected and corrected.
Key Concept:Terraform enforces the desired state defined in configuration, correcting drift automatically.
by Noel at Mar 16, 2026, 03:52 PM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).