Courseiva
Understand Terraform basicsmediumMultiple SelectObjective-mapped

TF-004 Understand Terraform basics Practice Question

Which three of the following are core characteristics of Terraform's execution plan? (Choose three.)

⚠ Common exam trap

HashiCorp often tests the misconception that the execution plan is an automatic apply mechanism or that it only detects drift from manual changes, when in fact it is a deliberate, user-initiated preview that compares the entire configuration against the current state.

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

It is generated by the `terraform plan` command.

The `terraform plan` command generates an execution plan that shows exactly what actions Terraform will take to reach the desired state defined in the configuration. This plan can be saved to a file and later applied using `terraform apply` with that file, ensuring the exact same changes are executed. These three characteristics are fundamental to Terraform's workflow, providing a safe and predictable way to manage infrastructure changes.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • It is generated by the `terraform plan` command.

    Why this is correct

    The Terraform execution plan is explicitly computed and displayed when the `terraform plan` command is executed. This command analyzes the current configuration, the existing state file, and the real-world infrastructure to determine the necessary actions. Its primary function is to provide a detailed preview of the infrastructure changes Terraform intends to make.

  • It shows what actions Terraform will take to reach the desired state.

    Why this is correct

    The core characteristic of a Terraform execution plan is its comprehensive detailing of proposed actions, such as creating, updating, or deleting resources. It serves as a precise blueprint, outlining the steps Terraform will undertake to reconcile the current infrastructure state with the desired state defined in the HCL configuration files. This ensures transparency and predictability before any changes are applied.

  • It can be saved to a file and later applied using `terraform apply` with that file.

    Why this is correct

    A critical feature of the execution plan is its ability to be saved to a designated file using the `terraform plan -out=filename` command. This saved plan file can then be passed directly to `terraform apply filename`, ensuring that the exact set of proposed changes is executed. This workflow is essential for consistent deployments, especially in CI/CD pipelines, as it prevents any drift between the planning and application phases.

  • It automatically applies changes to infrastructure without user confirmation.

    Why it's wrong here

    This statement is incorrect because the execution plan itself is merely a preview of proposed changes; it does not apply any modifications to the infrastructure. The `terraform apply` command is responsible for applying changes, and by default, it requires explicit user confirmation before proceeding. Only when the `-auto-approve` flag is used with `terraform apply` will changes be applied without an interactive prompt.

  • It only shows changes for resources that were manually modified outside Terraform.

    Why it's wrong here

    This is incorrect. The Terraform execution plan provides a comprehensive diff of *all* discrepancies between the desired state defined in the configuration and the actual state of the infrastructure. This includes changes proposed by the configuration itself, resources that need to be created or destroyed, and any detected drift from manual modifications or external processes. It is not limited to only external changes.

  • It is a read-only view of the current state file with no indication of future actions.

    Why it's wrong here

    This statement is inaccurate. While the execution plan considers the current state file, its primary purpose is to project *future actions* required to achieve the desired state defined in the configuration. It's a comparison between the desired configuration and the current reality, proposing changes (create, update, delete) rather than just being a static view of the existing state file.

About these practice questions

This TF-004 question is part of Courseiva's 428-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.