HashiCorp Certified: Terraform Associate — Question 184

A senior admin accidentally deleted some of your cloud instances. What does Terraform do when you run terraform apply?

Answer options

Correct answer: C

Explanation

The correct answer is C because Terraform is designed to manage the state of your infrastructure and will only recreate resources that are missing or have been deleted. Options A and B are incorrect as they imply a complete rebuild of all resources, which is not how Terraform functions. Option D is also wrong because Terraform will attempt to reconcile the state and restore the missing instances rather than just halting with an error.