Courseiva
Understand Terraform basicsmediumMatchingObjective-mapped

TF-004 Understand Terraform basics Practice Question

Match each Terraform feature to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Maps real-world resources to configuration

Plugin to interact with a specific cloud or service API

Container for multiple resources used together

Defines where state snapshots are stored

Executes scripts on local or remote machine during creation/destruction

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 State: A file that tracks the current state of resources managed by Terraform.

Terraform State tracks resource states, Providers enable API interactions, Modules bundle resources for reuse, and Workspaces manage environments. Common confusions include swapping State with Provider or Provider with Module.

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 State: A file that tracks the current state of resources managed by Terraform.

    Why this is correct

    Terraform state is a critical component, typically a JSON file, that meticulously records the real-world infrastructure managed by Terraform. It stores metadata about resources, their attributes, and the mapping between your configuration and the actual cloud objects. This state file enables Terraform to understand what currently exists, plan changes accurately, and prevent unintended modifications or resource recreation.

  • Terraform State: A plugin that interacts with APIs of a specific service.

    Why it's wrong here

    This description is incorrect for Terraform State. Terraform State is not a plugin; it is a persistent data store that records the current configuration and metadata of resources managed by Terraform. The definition provided accurately describes a Terraform Provider, which is the actual component responsible for interacting with the APIs of cloud providers or other services to provision and manage resources.

  • Terraform Provider: A plugin that interacts with APIs of a specific service.

    Why this is correct

    A Terraform Provider is indeed a specialized plugin that serves as an abstraction layer for interacting with a specific service's API, such as AWS, Azure, or Kubernetes. It translates the declarative resource definitions in your Terraform configuration into API calls to create, update, or delete infrastructure components. Providers are fundamental for Terraform's ability to manage diverse infrastructure platforms.

  • Terraform Provider: A container for multiple resources that are used together.

    Why it's wrong here

    This statement incorrectly describes a Terraform Provider. A Provider's function is to enable communication with a specific infrastructure service's API, not to group resources. The description provided, "a container for multiple resources that are used together," accurately defines a Terraform Module, which encapsulates and organizes related infrastructure components for reusability.

  • Terraform Module: A container for multiple resources that are used together, promoting reuse.

    Why this is correct

    A Terraform Module is a self-contained, reusable package of Terraform configurations that can define multiple resources. It acts as a logical grouping, allowing complex infrastructure patterns to be abstracted and shared across different projects or within the same project. Modules significantly enhance code organization, maintainability, and promote the "Don't Repeat Yourself" (DRY) principle by enabling consistent deployment of infrastructure components.

  • Terraform Workspace: A way to manage multiple environments (e.g., dev, prod) with the same configuration.

    Why this is correct

    Terraform Workspaces provide a mechanism to manage distinct, isolated state files for different environments using a single Terraform configuration. This allows practitioners to deploy the same infrastructure code to separate development, staging, and production environments without modifying the configuration files themselves. Workspaces help prevent accidental cross-environment changes and streamline environment management.

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.