HashiCorp Certified: Terraform Associate — Question 260
A junior admin accidentally deleted some of your cloud instances. What does Terraform do when you run terraform apply?
Answer options
- A. Build a completely brand new set of infrastructure
- B. Tear down the entire workspace infrastructure and rebuild it
- C. Rebuild only the instances that were deleted
- D. Stop and generate an error message about the missing instances
Correct answer: C
Explanation
The correct answer is C because Terraform will only recreate the resources that are missing in the current state compared to the desired state defined in the configuration. Options A and B are incorrect as they imply a complete rebuild of the infrastructure, while option D suggests an error generation instead of remediation.