nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #100

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

The correct answer is B. terraform init. terraform init must be the first command run in a new or cloned Terraform configuration directory. It initializes the working directory by downloading and installing the required provider plugins, setting up the backend for state storage, and downloading any referenced modules. W

Submitted by thandi_sa· Apr 18, 2026Use Terraform CLI

Question

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

Options

  • Aterraform import
  • Bterraform init
  • Cterraform plan
  • Dterraform workspace

How the community answered

(48 responses)
  • A
    6% (3)
  • B
    90% (43)
  • C
    2% (1)
  • D
    2% (1)

Explanation

terraform init must be the first command run in a new or cloned Terraform configuration directory. It initializes the working directory by downloading and installing the required provider plugins, setting up the backend for state storage, and downloading any referenced modules. Without running init first, commands like plan or apply will fail. Option A (terraform import) imports existing infrastructure into state and requires prior initialization. Option C (terraform plan) shows a preview of changes but requires initialization first. Option D (terraform workspace) manages workspaces but also requires initialization.

Topics

#terraform init#Terraform workflow#CLI commands#Configuration initialization

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice