TA-002-P · Question #110
The terraform init command is always safe to run multiple times, to bring the working directory up to date with changes in the configuration. Though subsequent runs may give errors, this command…
The correct answer is B. True. The terraform init command is designed to be safely executed multiple times without deleting existing configuration or state, serving to update the working directory with necessary components.
Question
The terraform init command is always safe to run multiple times, to bring the working directory up to date with changes in the configuration. Though subsequent runs may give errors, this command will never delete your existing configuration or state.
Options
- AFalse
- BTrue
How the community answered
(22 responses)- A5% (1)
- B95% (21)
Why each option
The `terraform init` command is designed to be safely executed multiple times without deleting existing configuration or state, serving to update the working directory with necessary components.
The statement is true because `terraform init` is designed for safe, repeatable execution without destructive actions on user configuration or state, making this choice incorrect.
`terraform init` is idempotent and safe to run repeatedly, as its primary purpose is to initialize and update the working directory by downloading providers, modules, and configuring the backend. It explicitly avoids deleting user-authored configuration files or the Terraform state file.
Concept tested: Terraform init command safety
Source: https://developer.hashicorp.com/terraform/cli/commands/init
Topics
Community Discussion
No community discussion yet for this question.