Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 185

What does terraform destroy do?

    Correct Answer: A

    The terraform destroy command is used to terminate resources defined in the current state file of a Terraform project. It specifically targets the resources that have been tracked and managed by Terraform, as specified in the state file. This command does not affect resources that are not in the state file or those outside the scope of the current Terraform project. Its primary function is to ensure that all managed infrastructure resources are properly destroyed, aligning the actual state with the desired state of having no resources.

Discussion
dinesh198728Option: A

The terraform destroy command terminates resources managed by your Terraform project. This command is the inverse of terraform apply in that it terminates all the resources specified in your Terraform state. It does not destroy resources running elsewhere that are not managed by the current Terraform project. https://learn.hashicorp.com/tutorials/terraform/aws-destroy

DerekKeyOption: A

A - Correct Terraform destroy destroys every resource that was created by Terraform - it means every resource stored in terraform.tfstate

dinesh198728Option: A

Must be A

kiran15789Option: A

Option C is not correct because the command only destroys the infrastructure defined in the Terraform configuration files, not all infrastructure in the configured Terraform provider.

dk_2022Option: C

C is the right answer: The terraform destroy command destroys all of the resources being managed by the current working directory and workspace, using state data to determine which real world objects correspond to managed resources. A destroy behaves exactly like deleting every resource from the configuration

duffyduckOption: A

This is a question about Terraform -Destory Command: destroy The terraform destroy command is a convenient way to destroy all remote objects managed by a particular Terraform configuration. While you will typically not want to destroy long-lived objects in a production environment, Terraform is sometimes used to manage ephemeral infrastructure for development purposes, in which case you can use terraform destroy to conveniently clean up all of those temporary objects once you are finished with your work.

donathonOption: A

I vote for A. The destroy will only delete those that are in the state. Eg. even if you have a new resource configured after the last apply (which would be in the state), it will not delete this resources as it cannot be found in the state.

Nunyabiznes

answers are : AC

campsOption: A

A. Destroy all infrastructure in the Terraform state file. Terraform destroy is a command used to destroy all the infrastructure resources that are defined in the Terraform configuration file. This command removes all resources created by the Terraform configuration and deletes them from the infrastructure provider, effectively tearing down the entire infrastructure that was created using Terraform. The command operates on the Terraform state file, which is used to track the current state of the infrastructure. When the command is executed, it removes all resources in the state file and makes the infrastructure match the desired state of having no resources.

phidelicsOption: A

destroy all infrastructure

ZeppoonstreamOption: A

A. Destroy all infrastructure in the Terraform state file terraform destroy command is used to destroy all infrastructure resources that are managed by Terraform in the current state file. This command will ask for confirmation before proceeding with the destruction and will remove the resources from the provider, and also remove the resources from the state file.

InformationOverloadOption: A

A - is correct

G4ExamsOption: A

A is right. The rest are distructors

alifieOption: A

A it is

lordogre16Option: C

It's C "The terraform destroy command is used to destroy the project infrastructure and free up the allocated resources. terraform destroy only destroys the infrastructure for the current project. There are no changes made to the resources allocations running elsewhere." https://www.educative.io/answers/what-is-the-command-to-destroy-infrastructure-in-terraform

lordogre16

I take this all back it's actually A, it modifies the state file not the set provider

lezgino

Destroy all infrastructure in the Terraform state file is the correct answer. The terraform destroy command is used to destroy the infrastructure that has been created and managed by Terraform, as described in the Terraform documentation: https://www.terraform.io/docs/commands/destroy.html. A is correct]

shopkittyOption: A

I votes for A

geekneekOption: C

I think is C. "The terraform destroy command terminates resources managed by your Terraform project. This command is the inverse of terraform apply in that it terminates all the resources specified in your Terraform state. It does not destroy resources running elsewhere that are not managed by the current Terraform project." https://learn.hashicorp.com/tutorials/terraform/aws-destroy