HashiCorp Certified: Terraform Associate — Question 58
Which task does terraform init not perform?
Answer options
- A. Sources all providers present in the configuration and ensures they are downloaded and available locally
- B. Connects to the backend
- C. Sources any modules and copies the configuration locally
- D. Validates all required variables are present
Correct answer: D
Explanation
The correct answer is D because terraform init does not validate the presence of required variables; it focuses on initializing the working directory. Options A, B, and C all describe tasks that are indeed performed by terraform init, such as sourcing providers, connecting to the backend, and sourcing modules.