nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #78

When should you run terraform init?

The correct answer is D. After you start coding a new terraform project and before you run terraform plan for the first time.. You should run terraform init after you start coding a new Terraform project and before you run terraform plan for the first time. This command will initialize the working directory by downloading the required providers and modules, creating the initial state file, and performing

Submitted by brentm· Apr 18, 2026Use Terraform CLI

Question

When should you run terraform init?

Options

  • AEvery time you run terraform apply
  • BBefore you start coding a new Terraform project
  • CAfter you run terraform plan for the time in a new terraform project and before you run terraform
  • DAfter you start coding a new terraform project and before you run terraform plan for the first time.

How the community answered

(59 responses)
  • A
    2% (1)
  • B
    5% (3)
  • C
    2% (1)
  • D
    92% (54)

Explanation

You should run terraform init after you start coding a new Terraform project and before you run terraform plan for the first time. This command will initialize the working directory by downloading the required providers and modules, creating the initial state file, and performing other necessary

Topics

#terraform init#CLI workflow#Initialization#Provider installation

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice