Courseiva
Understand IaC conceptshardMultiple SelectObjective-mapped

TF-004 Understand IaC concepts Practice Question

Which three characteristics are associated with immutable infrastructure as practiced by Terraform?

⚠ Common exam trap

It's easy for candidates to confuse immutable infrastructure with mutable patterns, mistakenly thinking that in-place updates or accepting drift are acceptable, when Terraform's immutable model strictly replaces resources to enforce consistency.

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

New versions are deployed by creating new instances

Immutable infrastructure in Terraform involves deploying new versions by creating entirely new instances rather than modifying existing ones. This aligns with Terraform's resource lifecycle, where changes to certain attributes trigger destruction and recreation, ensuring a consistent and reproducible 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.

  • New versions are deployed by creating new instances

    Why this is correct

    In immutable infrastructure, deploying a new version involves provisioning entirely new instances from a fresh, updated image or configuration. These new instances replace the old ones, which are then decommissioned, ensuring that every deployment starts from a known, consistent state rather than modifying existing running systems.

  • Configuration drift is accepted

    Why it's wrong here

    Configuration drift is explicitly rejected and actively prevented in immutable infrastructure paradigms. Instead of allowing changes to accumulate on running instances, any deviation from the desired state necessitates the replacement of the affected resource with a new, correctly configured instance, thereby eliminating the potential for inconsistencies over time.

  • Rollbacks are performed by redeploying a previous version

    Why this is correct

    Rollbacks in an immutable system are achieved by simply deploying a previously validated and known-good version of the infrastructure or application image. This process involves provisioning new instances using the older, stable artifact and then routing traffic to them, effectively replacing the problematic version without attempting to 'undo' changes on the failed instances.

  • Resources are replaced rather than modified in place

    Why this is correct

    The fundamental principle of immutable infrastructure dictates that once a resource, such as a server or container, is provisioned, it should never be modified in place. Any required change, whether an application update or a configuration tweak, triggers the creation of entirely new resources with the desired modifications, which then replace the older, unchanged ones.

  • In-place updates are preferred

    Why it's wrong here

    In-place updates are fundamentally antithetical to the immutable infrastructure philosophy. Preferring in-place updates introduces the risk of configuration drift, inconsistent environments, and unpredictable behavior, as each update could leave behind artifacts or introduce subtle differences that make debugging and ensuring reliability significantly more challenging.

About these practice questions

One of 428 original TF-004 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.