nerdexam
HashiCorp

TA-002-P · Question #304

True or False? By default, Terraform destroy will prompt for confirmation before proceeding.

The correct answer is B. True. By default, Terraform's destroy command requires explicit confirmation before it proceeds to deprovision infrastructure.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

True or False? By default, Terraform destroy will prompt for confirmation before proceeding.

Options

  • AFalse
  • BTrue

How the community answered

(26 responses)
  • A
    12% (3)
  • B
    88% (23)

Why each option

By default, Terraform's `destroy` command requires explicit confirmation before it proceeds to deprovision infrastructure.

AFalse

`terraform destroy` explicitly prompts for confirmation by default to prevent accidental resource deletion.

BTrueCorrect

The `terraform destroy` command is a destructive operation that removes all resources managed by the current Terraform configuration. To prevent accidental data loss, Terraform includes a default safety mechanism that prompts the user for confirmation before executing the destruction plan.

Concept tested: Terraform destroy confirmation prompt

Source: https://developer.hashicorp.com/terraform/cli/commands/destroy

Topics

#terraform destroy#CLI commands#default behavior#confirmation

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice