When you run 'terraform destroy', what happens before the approval prompt?

Prepare for your Terraform Associate Exam with our engaging quiz. Test your knowledge with multiple choice questions and receive detailed explanations to enhance your understanding. Ace your exam with confidence!

When you execute the command 'terraform destroy', the first action taken before the approval prompt is to list all resources that are scheduled to be destroyed. This process provides users with a clear and comprehensive view of which resources will be impacted, ensuring that there is awareness and understanding of the upcoming changes.

Listing resources is a crucial step because it allows you to confirm that you genuinely intend to destroy those specific resources, reducing the risk of accidentally deleting critical infrastructure. The prompt that follows this listing is important for obtaining explicit user consent before any changes are made, emphasizing Terraform's emphasis on user control and deliberate actions regarding infrastructure management.

Other options, such as automatically destroying resources without a prompt, running validation checks, or logging changes for auditing, do not accurately describe the sequence of actions taken during the 'terraform destroy' process. In particular, the focus on listing resources serves to enhance user awareness and accountability in managing infrastructure, which is a fundamental principle of using Infrastructure as Code tools like Terraform.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy