Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 134


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.)

Show Answer
Correct Answer: AC

To see all the resources that will be deleted by Terraform, you should run the terraform plan -destroy command. This command will provide a detailed plan showing all the resources that will be removed, allowing you to preview the changes safely before any destruction occurs. Additionally, when you run the terraform destroy command, it will generate an execution plan that lists the resources to be deleted and prompt for approval before proceeding. This ensures you have the opportunity to review the affected resources before confirming the destruction.

Discussion

11 comments
Sign in to comment
bora4motionOptions: AC
Sep 2, 2022

I go with AC

imkhanOptions: AC
Oct 19, 2023

AC are the correct options When you want to see a preview of the resources that will be deleted by Terraform, you can use the terraform plan -destroy command to generate a destruction plan that shows what will be removed. This is a safe way to ensure you understand the impact of the destroy operation before proceeding. Option C is also correct because when you run terraform destroy, Terraform will provide an execution plan that lists the resources to be deleted before it actually prompts you for approval to proceed with the destruction. This allows you to review the list of resources that will be affected before confirming the destroy operation.

BurakkoOptions: AC
Sep 1, 2022

It is AC. terraform show only shows the state file

VamsiPopuriOptions: AC
Feb 3, 2023

A and C. Aren't B and D the same ?

Bilalglg93350Options: AD
Mar 14, 2023

A. Run terraform plan -destroy D. Run terraform show -destroy To see all the resources that will be deleted by Terraform, you should run the terraform plan -destroy command. This command will show a preview of all the changes that Terraform will make, including any resources that will be deleted. After running the terraform plan -destroy command, you can also run the terraform show -destroy command to view a detailed summary of the resources that will be deleted. Option C (Run terraform destroy and it will first output all the resources that will be deleted before prompting for approval) is not correct. Running the terraform destroy command will immediately destroy all the resources without showing a preview of what will be deleted. To be safe, it is recommended to run the terraform plan -destroy command first to see the resources that will be deleted, and then run terraform destroy to confirm the deletion.

MrTee
Jul 16, 2023

Terraform show -destroy is not a valid command

Halimb
Sep 6, 2023

Nosense. There is no terraform show -destroy. Stop confusing people. Answer is A&C.

Roytf
Oct 9, 2023

don't paste chatGpt output..option D is invalid

dc_98Options: AC
Sep 1, 2022

There is no terraform show -destroy

Atta33Options: AC
Oct 6, 2022

AC is correct

shopkittyOptions: AC
Sep 8, 2022

vote for A & C

RVivekOptions: AC
Sep 26, 2022

A and C

rafpeOptions: AC
Dec 28, 2022

Def A&C

gofavad926Options: AC
Sep 29, 2023

AC for sure