Courseiva
Use the core Terraform workflowmediumMultiple ChoiceObjective-mapped

TF-004 Use the core Terraform workflow Practice Question

A team is using Terraform workspaces to manage multiple environments with a single configuration. They store state in an S3 backend. Which statement about Terraform workspaces is true?

⚠ Common exam trap

Candidates often assume workspaces isolate variables and provider configurations, but Terraform workspaces only isolate state; variable values and provider configurations must be managed separately, which is a common source of confusion in the exam.

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

The default workspace is named "default" and cannot be deleted

The default workspace in Terraform is always named 'default' and cannot be deleted. This workspace is created automatically when you initialize a configuration, and it serves as the baseline workspace for state management. The S3 backend fully supports workspaces, and each workspace stores its state under a separate path in the S3 bucket, enabling environment isolation without changing the configuration.

Answer analysis

Option-by-option breakdown

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

  • There is a limit of 10 workspaces per configuration

    Why it's wrong here

    Terraform workspaces do not impose a hard limit on the number of workspaces per configuration. While practical considerations like manageability and performance might suggest a reasonable number, the Terraform CLI itself does not enforce any arbitrary numerical cap, allowing users to create as many distinct state environments as their operational needs dictate. This flexibility is crucial for managing diverse environments like development, staging, and production within a single configuration.

  • The default workspace is named "default" and cannot be deleted

    Why this is correct

    The "default" workspace is a fundamental component of Terraform's workspace management, automatically created when `terraform init` is first run in a directory. This workspace serves as the initial and fallback environment for state management. It cannot be deleted using `terraform workspace delete default` because Terraform requires at least one active workspace to manage state, ensuring continuity and preventing accidental loss of the primary state file.

  • Workspaces can only be used with the local backend

    Why it's wrong here

    This statement is incorrect because Terraform workspaces are designed to function seamlessly with all supported backends, not exclusively the local backend. Whether using remote backends like Terraform Cloud, S3, Azure Blob Storage, or others, workspaces provide state isolation by storing each workspace's state file distinctly within that backend. This broad compatibility is essential for collaborative and production-grade infrastructure management.

  • Workspaces automatically isolate variable values and provider configurations

    Why it's wrong here

    Workspaces in Terraform primarily provide isolation for the *state file*, meaning each workspace maintains its own `.tfstate` file. However, they do not automatically isolate variable values, provider configurations, or input variables. These elements are shared across all workspaces for a given configuration unless explicitly managed through separate `.tfvars` files, environment variables, or distinct provider blocks with aliasing, which requires manual configuration per workspace.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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.