TF-004 Understand Terraform's purpose Practice Question
What does Terraform's declarative model mean for infrastructure changes?
⚠ Common exam trap
TF-004 often tests the confusion between declarative (describe end state) and imperative (specify steps/order) — candidates may pick 'specify order of creation' thinking Terraform needs explicit sequencing, when it actually infers it.
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
✓
You describe the desired end state
Terraform's declarative model means you describe the desired end state of your infrastructure in configuration files, and Terraform determines the actions needed to reach that state. You do not specify the sequence of API calls or the order of resource creation; Terraform builds a dependency graph and executes operations in the correct order automatically. This contrasts with imperative scripting, where you must define each step explicitly.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
You manually approve each step
Why it's wrong here
While Terraform does present a plan for review before applying changes, requiring a manual `terraform apply` confirmation, this is a safety mechanism, not an inherent characteristic of the declarative model itself. The declarative model focuses on defining the desired end state, allowing the tool to determine the necessary actions, rather than mandating step-by-step human approval for every granular operation within that process.
- ✓
You describe the desired end state
Why this is correct
Terraform's declarative model fundamentally means you define the desired final configuration of your infrastructure using HashiCorp Configuration Language (HCL). Instead of providing a sequence of commands to execute, you simply describe 'what' your infrastructure should look like, including resources, their properties, and relationships. Terraform then intelligently calculates the 'how' — the precise actions needed to achieve that specified end state from the current infrastructure.
- ✗
You must specify the order of creation
Why it's wrong here
The declarative model explicitly abstracts away the need for users to specify the precise order of resource creation, modification, or deletion. Terraform automatically constructs a dependency graph based on resource relationships defined in the configuration, such as an EC2 instance depending on a VPC subnet. This intelligent graph traversal ensures resources are provisioned in the correct sequence, preventing errors that would arise from attempting to create dependent resources prematurely.
- ✗
You write scripts to create resources
Why it's wrong here
Writing scripts to create resources represents an imperative approach, where you dictate the exact procedural steps and commands to be executed to achieve a state. In contrast, Terraform's declarative model focuses on describing the desired outcome, allowing the tool to determine the most efficient and safe path to reach that state. This distinction means users define infrastructure using a high-level configuration language rather than low-level, step-by-step programming logic.
Go deeper
Related to this question
About these practice questions
Courseiva writes every TF-004 question from scratch — 434 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 →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official HashiCorp exam blueprint
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.