Terraform Associate Practice Exam

Image Description

Question: 1 / 400

To safely view all resources that will be deleted by Terraform, which command should you use?

terraform delete

Run 'terraform plan -destroy'

Utilizing the command 'terraform plan -destroy' is the appropriate method to review all resources that Terraform will delete. This command generates an execution plan that details what actions Terraform will take if you proceed with the deletion. It allows users to carefully examine the list of resources set for removal before actually executing any destructive changes.

This proactive approach ensures that users have a chance to confirm the implications of their actions, thereby minimizing the risk of unintentionally deleting vital resources. Running this command provides insights into the state of resources and facilitates informed decision-making.

In contrast, executing 'terraform destroy' without any flags directly initiates the delete operation without providing the opportunity for review, which could lead to accidental loss of important infrastructure. Similarly, 'terraform delete' is not a valid command in Terraform's CLI, and 'terraform show -destroy' does not exist as a command that lists deletions. Therefore, 'terraform plan -destroy' stands out as the safest and most informative choice.

Get further explanation with Examzify DeepDiveBeta

Run 'terraform destroy' without flags

Run 'terraform show -destroy'

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy