HashiCorp Certified: Terraform Associate — Question 277

You have used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your
Terraform configuration. To be safe, you would like to first see all the infrastructure that will be deleted by Terraform.
Which command should you use to show all of the resources that will be deleted? (Choose two.)

Answer options

Correct answer: A, C

Explanation

The correct answers are A and C. Running 'terraform plan -destroy' provides a detailed plan of the resources that will be deleted, while 'terraform destroy' gives a list of resources before requesting confirmation. Options B and D are incorrect as 'terraform show -destroy' is not a valid command for previewing deletions.