HashiCorp Certified: Terraform Associate — Question 43

What command does Terraform require the first time you run it within a configuration directory?

Answer options

Correct answer: B

Explanation

The correct answer is B, 'terraform init', as this command initializes the working directory containing Terraform configuration files. It sets up the necessary backend and installs required provider plugins, which is essential before running any other Terraform commands. The other options do not initialize the directory and are used for different purposes, such as importing resources or planning deployments.