QuestionQ138

Core Terraform workflow

When should you execute terraform init?

  • A After you start coding a new Terraform project, and before you run terraform plan for the first time.
  • B Every time you run terraform apply.
  • C Before you start coding a new Terraform project.
  • D After you run terraform plan for the first time in a new Terraform project, and before you run terraform apply.
Explanation

terraform init prepares a Terraform working directory by initializing the backend and installing required providers and modules. Run it in a new project before the first terraform plan; rerun it when backend or module configuration changes.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!