HashiCorpHashiCorp
TA-002-P · Question #345
TA-002-P Question #345: Real Exam Question with Answer & Explanation
The correct answer is B: Validates all required variables are present. The terraform init command prepares a Terraform working directory by downloading providers and modules and initializing the backend, but it does not validate that all required variables are present.
Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Question
Which task does teraform init not perform?
Options
- ASources any modules and copies the configuration locally
- BValidates all required variables are present
- CConnects to the backend
- DSources all providers present in the configuration and ensures they are downloaded and available
Explanation
The terraform init command prepares a Terraform working directory by downloading providers and modules and initializing the backend, but it does not validate that all required variables are present.
Common mistakes.
- A.
terraform initdownloads and copies modules used in the configuration, making them available for use. - C.
terraform initestablishes the connection to the configured backend, which is essential for state management and collaboration. - D.
terraform initdiscovers and downloads the necessary provider plugins specified in the configuration, ensuring they are available for resource management.
Concept tested. Terraform init command functionalities
Reference. https://developer.hashicorp.com/terraform/cli/commands/init
Topics
#terraform init#CLI commands#providers#modules
Community Discussion
No community discussion yet for this question.