TF-004 Understand IaC concepts Practice Question
You are a platform engineer at a growing startup. The company currently manages infrastructure manually by SSH-ing into servers to install packages and update configurations. As the team grows, this approach has led to frequent configuration drift, inconsistent environments, and manual errors. Deploying a new environment takes several days and requires detailed runbooks. The CTO has asked you to propose a solution that improves consistency, reduces deployment time, and enables version control of infrastructure. You are evaluating Infrastructure as Code (IaC) tools like Terraform. Which course of action best addresses the CTO's requirements?
⚠ Common exam trap
HashiCorp often tests the distinction between configuration management tools (like Ansible) and infrastructure provisioning tools (like Terraform), trapping candidates who confuse managing software on existing servers with defining and versioning the infrastructure itself.
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
✓
Adopt Terraform to define all infrastructure as code, store configurations in a Git repository, and use a CI/CD pipeline to apply changes automatically.
Terraform directly addresses the CTO's requirements by enabling infrastructure as code (IaC), which ensures consistent, repeatable deployments through declarative configuration files stored in Git for version control. Using a CI/CD pipeline to automatically apply changes eliminates manual SSH errors, reduces deployment time from days to minutes, and prevents configuration drift by enforcing a single source of truth for infrastructure state.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Improve SSH key management and use configuration management tools like Ansible to apply changes.
Why it's wrong here
Improving SSH key management and using configuration management tools like Ansible primarily addresses post-provisioning configuration and application deployment, not the declarative provisioning and lifecycle management of the underlying infrastructure itself. While Ansible can configure existing servers, it does not define or manage cloud resources such as virtual machines, networks, or databases from creation to destruction, nor does it inherently enforce version-controlled infrastructure state.
- ✗
Migrate all applications to containers and use Kubernetes for orchestration.
Why it's wrong here
Migrating applications to containers and orchestrating them with Kubernetes focuses on application deployment, scaling, and runtime management, not the provisioning of the underlying infrastructure. Kubernetes itself requires servers, networking, and storage to operate, which still need to be provisioned and managed. This approach shifts application concerns but leaves the fundamental infrastructure provisioning challenges unaddressed by IaC principles.
- ✓
Adopt Terraform to define all infrastructure as code, store configurations in a Git repository, and use a CI/CD pipeline to apply changes automatically.
Why this is correct
Adopting Terraform for Infrastructure as Code (IaC) allows declarative definition of all infrastructure resources, ensuring consistency and repeatability across environments. Storing these configurations in a Git repository provides robust version control, auditability, and collaborative development, while a CI/CD pipeline automates the application of changes. This integrated approach eliminates manual errors, enforces the desired state, and significantly accelerates infrastructure provisioning and updates.
- ✗
Create more detailed runbooks and require peer review for all manual changes.
Why it's wrong here
Creating more detailed runbooks and requiring peer review, while improving documentation and oversight, fundamentally remains a manual process for infrastructure changes. Manual steps are inherently prone to human error, inconsistency, and slow execution, even with stringent review. This approach lacks the automation, idempotency, and state management capabilities essential for scalable, reliable, and rapid infrastructure operations.
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 →
JA
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.