ExamGecko
Home / HashiCorp / Terraform Associate 003 / Practice Test 1
Ask Question

HashiCorp Terraform Associate 003 Practice Test 1

00:00:00
Show Answer
Report Issue   Restart test

Question 1 / 40

You have created a main.tf Terraform configuration consisting of an application server, a database and a load balanced. You ran terraform apply and Terraform created all of the resources successfully.

Now you realize that you do not actually need the load balancer, so you run terraform destroy without any flags. What will happen?

Terraform will prompt you to pick which resource you want to destroy
Terraform will prompt you to pick which resource you want to destroy
Terraform will destroy the application server because it is listed first in the code
Terraform will destroy the application server because it is listed first in the code
Terraform will prompt you to confirm that you want to destroy all the infrastructure
Terraform will prompt you to confirm that you want to destroy all the infrastructure
Terraform will destroy the main, tf file
Terraform will destroy the main, tf file
Terraform will immediately destroy all the infrastructure
Terraform will immediately destroy all the infrastructure
Comment (0)
Suggested answer: C
Explanation:

This is what will happen if you runterraform destroywithout any flags, as it will attempt to delete all the resources that are associated with your current working directory or workspace. You can use the-targetflag to specify a particular resource that you want to destroy.

asked 18/09/2024
Ryan Campbell
31 questions