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
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.
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.
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.
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
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
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]
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.
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
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.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
dinesh198728
Highly Voted 2 years, 2 months agokiran15789
Most Recent 1 year, 6 months agoNunyabiznes
1 year, 7 months agocamps
1 year, 7 months agophidelics
1 year, 8 months agoZeppoonstream
1 year, 10 months agoInformationOverload
1 year, 11 months agoDerekKey
1 year, 11 months agoG4Exams
2 years agodk_2022
2 years, 1 month agoalifie
2 years, 1 month agolordogre16
2 years, 2 months agolordogre16
2 years, 2 months agolezgino
1 year, 9 months agoduffyduck
2 years, 2 months agoshopkitty
2 years, 2 months agogeekneek
2 years, 2 months agodinesh198728
2 years, 2 months agodonathon
2 years, 2 months ago