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

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

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

Explanation:
Terraform tracks what should exist based on your configuration and its state. When some cloud instances are deleted outside Terraform, Terraform detects drift and, on apply, will reconcile by recreating only the resources that are missing to bring the real infrastructure back in line with the configuration. It doesn’t tear down everything or rebuild the entire environment, and it won’t error out just because something was deleted. So, the deleted instances get recreated, leaving other resources as they are.

Terraform tracks what should exist based on your configuration and its state. When some cloud instances are deleted outside Terraform, Terraform detects drift and, on apply, will reconcile by recreating only the resources that are missing to bring the real infrastructure back in line with the configuration. It doesn’t tear down everything or rebuild the entire environment, and it won’t error out just because something was deleted. So, the deleted instances get recreated, leaving other resources as they are.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy