Courseiva

TF-004 Understand Terraform's purpose Practice Question

Which TWO of the following are core components of Terraform's workflow? (Select TWO.)

⚠ Common exam trap

Candidates often mistake auxiliary commands like `terraform destroy` or `terraform validate` as part of the core workflow, but the core workflow is `init`, `plan`, and `apply`.

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

✓

terraform init

Terraform's core workflow consists of three main steps: init, plan, and apply. `terraform init` initializes the working directory by downloading the required providers and modules, setting up the backend, and preparing the environment for configuration. `terraform plan` creates an execution plan showing what actions Terraform will take to reach the desired state, allowing you to preview changes before applying them.

Answer analysis

Option-by-option breakdown

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

  • ✗

    terraform validate

    Why it's wrong here

    Validate checks configuration syntax and is a useful auxiliary command, but Terraform's core workflow is write, plan and apply. It tempts because it runs early in a pipeline and catches errors, and it is correct when the requirement is pre-apply configuration linting rather than the workflow itself.

  • ✓

    terraform init

    Why this is correct

    `terraform init` initialises the working directory, downloading the required provider plugins and modules and writing the dependency lock file. This satisfies the stem's workflow requirement, since no plan or apply can run until providers are installed and the backend is configured.

  • ✗

    terraform install

    Why it's wrong here

    Terraform's core workflow is init, plan, apply and destroy; there is no install command, since installation is handled by a package manager or binary download. It tempts because installing the CLI is a genuine prerequisite step, but it sits outside the workflow commands themselves.

  • ✗

    terraform destroy

    Why it's wrong here

    Destroy is a real Terraform command, but the core workflow comprises write, plan and apply; destroy is a lifecycle operation, not one of the three workflow stages. It tempts because it is commonly used alongside apply, and it is correct when the task is explicitly tearing down managed infrastructure.

  • ✓

    terraform plan

    Why this is correct

    `terraform plan` compares the desired state in configuration against recorded state and real infrastructure, producing an execution preview without applying changes. This satisfies the workflow's planning stage, where proposed actions are reviewed before `terraform apply` mutates resources, making it a core component alongside write, plan and apply.

About these practice questions

This TF-004 question is part of Courseiva's 434-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.