nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #220

You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time. Which Terraform command should…

The correct answer is B. terraform init. B (terraform init) - Must be run first to initialize the Terraform working directory, download providers, and configure the backend. A (terraform apply) - Requires initialization first, so it cannot be run before terraform init. C (terraform plan) - Also requires terraform init…

Navigate Terraform workflow

Question

You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time. Which Terraform command should you run first?

Options

  • Aterraform apply
  • Bterraform init
  • Cterraform plan
  • Dterraform show

How the community answered

(24 responses)
  • A
    8% (2)
  • B
    83% (20)
  • C
    4% (1)
  • D
    4% (1)

Explanation

B (terraform init) - Must be run first to initialize the Terraform working directory, download providers, and configure the backend. A (terraform apply) - Requires initialization first, so it cannot be run before terraform init. C (terraform plan) - Also requires terraform init first to generate a plan. D (terraform show) - Displays the state, not relevant for first-time deployment.

Topics

#terraform init#workflow order#initialization

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice