TERRAFORM-ASSOCIATE-004 · 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 you
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 f
Question
Options
- Aterraform apply
- Bterraform init
- Cterraform plan
- Dterraform show
How the community answered
(38 responses)- A8% (3)
- B87% (33)
- C3% (1)
- D3% (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
Community Discussion
No community discussion yet for this question.