Drag steps to the numbered slots on the right, or tap a step then tap a slot.
TF-004 Understand Terraform basics Practice Question
Drag and drop the steps to create and apply a Terraform plan in the correct order.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
1. Terraform init, 2. Terraform plan, 3. Terraform apply
The correct sequence is: Terraform init (initialize the working directory and download providers/modules), Terraform plan (review the changes Terraform will make), and Terraform apply (execute the planned changes). This order ensures the environment is ready, changes are reviewed, and then safely applied.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
1. Terraform init, 2. Terraform plan, 3. Terraform apply
Why this is correct
This sequence represents the standard and recommended workflow for managing infrastructure with Terraform. First, `terraform init` prepares the working directory by downloading necessary provider plugins and modules, establishing the backend configuration. Next, `terraform plan` generates an execution plan, detailing all proposed infrastructure changes (create, update, destroy) without actually applying them, allowing for a crucial review. Finally, `terraform apply` executes this approved plan, provisioning or modifying the infrastructure to match the desired state defined in the configuration files.
- ✗
1. Terraform plan, 2. Terraform init, 3. Terraform apply
Why it's wrong here
This order is incorrect because `terraform plan` cannot be executed before the working directory has been properly initialized. The `terraform init` command is responsible for downloading and configuring the required provider plugins and modules that enable Terraform to parse the configuration, understand resource types, and interact with cloud APIs. Without these foundational components, `terraform plan` would fail to generate an execution plan, making `init` an essential prerequisite.
- ✗
1. Terraform init, 2. Terraform apply, 3. Terraform plan
Why it's wrong here
This sequence is incorrect because it bypasses the critical review step provided by `terraform plan`. While `terraform init` correctly prepares the environment, immediately running `terraform apply` would provision or modify infrastructure without first generating and inspecting an execution plan. This significantly increases the risk of unintended changes, resource misconfigurations, or unexpected costs, as there is no opportunity to preview the proposed actions before they are executed.
- ✗
1. Terraform plan, 2. Terraform apply, 3. Terraform init
Why it's wrong here
This order is fundamentally flawed because both `terraform plan` and `terraform apply` require a properly initialized working directory to function. Attempting to run either command before `terraform init` will result in errors, as Terraform will lack the necessary provider plugins and modules to interpret the configuration or communicate with the target infrastructure. Furthermore, even if `init` were performed later, applying changes before planning them introduces significant risk, making this sequence entirely impractical and unsafe for infrastructure management.
Go deeper
Related to this question
About these practice questions
Courseiva writes every TF-004 question from scratch — 428 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This TF-004 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the TF-004 exam.