If you run terraform destroy without any flags after applying a configuration that includes a load balancer, what will Terraform do?

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

If you run terraform destroy without any flags after applying a configuration that includes a load balancer, what will Terraform do?

Explanation:
Running terraform destroy computes a plan of what would be destroyed and, by default, asks you to confirm before proceeding. This confirmation step applies to all resources managed by the state, including a load balancer if it’s part of the configuration. The prompt exists as a safety measure to prevent accidental destruction of infrastructure. You can skip the prompt with -auto-approve. It won’t delete the configuration files themselves (like main.tf) and you don’t get to pick individual resources unless you use specific options such as -target.

Running terraform destroy computes a plan of what would be destroyed and, by default, asks you to confirm before proceeding. This confirmation step applies to all resources managed by the state, including a load balancer if it’s part of the configuration. The prompt exists as a safety measure to prevent accidental destruction of infrastructure. You can skip the prompt with -auto-approve. It won’t delete the configuration files themselves (like main.tf) and you don’t get to pick individual resources unless you use specific options such as -target.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy