Courseiva

TF-004 Understand Terraform's purpose Practice Question

Which THREE are part of Terraform's core workflow? (Choose three.)

⚠ Common exam trap

The exam often tests the distinction between the core workflow (write, plan, apply) and auxiliary commands like import or destroy, so the trap is that candidates may incorrectly include import or destroy as part of the core workflow because they are common Terraform operations.

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

✓

Apply

Terraform's documented core workflow consists of three steps: Write, Plan, and Apply. Option E (Write) is correct because it is the first phase, where you author infrastructure as code in HashiCorp Configuration Language (HCL) in .tf files. Option C (Plan) is correct because it is the second phase, where `terraform plan` produces an execution plan showing the actions Terraform will take to reach the desired state. Option A (Apply) is correct because it is the third phase, where `terraform apply` executes the planned changes to provision or modify real infrastructure. Option B (Import) is not part of the core workflow; `terraform import` is a supplementary command used to bring existing resources under Terraform management. Option D (Destroy) is not one of the three core workflow phases either; `terraform destroy` is a convenience command that applies a plan to remove all managed infrastructure, but it is not counted among Write, Plan, and Apply.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Apply

    Why this is correct

    The "Apply" step, executed via `terraform apply`, is the critical phase where Terraform takes the execution plan generated during the `plan` step and provisions, updates, or deletes real infrastructure resources in the target cloud or on-premises environment. It prompts for user confirmation by default, ensuring that the proposed changes are reviewed before any actual modifications are made to the infrastructure. This action directly reconciles the desired state defined in configuration with the actual infrastructure, updating the Terraform state file upon successful completion.

  • ✗

    Import

    Why it's wrong here

    The `terraform import` command serves a specialized purpose, allowing users to bring existing, manually created infrastructure resources under Terraform management by associating them with a resource block in the configuration and recording them in the state file. It is considered an operational utility rather than an integral part of the continuous infrastructure lifecycle management, which typically involves defining new resources in configuration and then provisioning them. Therefore, while valuable for specific migration or adoption scenarios, it falls outside the standard `write`, `plan`, `apply` core workflow for day-to-day operations.

  • ✓

    Plan

    Why this is correct

    The "Plan" step, initiated with `terraform plan`, is a crucial preparatory phase that analyzes the current state of the infrastructure, compares it against the desired state defined in the Terraform configuration files, and then generates a detailed execution plan. This plan meticulously outlines all proposed changes, including creations, updates, and destructions, without actually modifying any real resources. It provides a transparent preview of what Terraform intends to do, enabling operators to review and approve the actions before committing to them with an `apply` operation.

  • ✗

    Destroy

    Why it's wrong here

    The `terraform destroy` command is a specific operational action designed to deprovision all resources managed by a given Terraform configuration, effectively tearing down the entire infrastructure defined within it. While it performs the inverse operation of provisioning, it internally leverages the same core planning and application mechanisms as `terraform apply`, albeit with an implicit plan to remove everything. Consequently, `destroy` is considered a specialized use case or a variant of the `apply` process for resource removal, rather than a distinct, independent step within the continuous core workflow of infrastructure management.

  • ✓

    Write

    Why this is correct

    The initial and foundational step in Terraform's core workflow is "Write", which involves authoring the desired infrastructure state using HashiCorp Configuration Language (HCL) within `.tf` files. This declarative configuration defines the resources, providers, and their desired attributes, serving as the single source of truth for the infrastructure to be managed. Without a well-defined configuration, no subsequent planning or application steps can occur, making this the essential starting point for any Terraform project.

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.