Courseiva
Deployment →easyMultiple Select

CV0-004 Deployment Practice Question

A cloud engineer is using Terraform to manage infrastructure. They need to store the state file remotely for team collaboration and to enable state locking. Which THREE of the following backends support state locking? (Select THREE.)

⚠ Common exam trap

CV0-004 often tests the misconception that any remote backend supports locking — candidates pick HTTP or local because they 'store state remotely' and forget that locking requires a backend with a locking API.

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

✓

Consul backend

The Consul backend (A) supports state locking natively through Consul's session and key-value store mechanisms, so Terraform can acquire a lock before modifying state. Azure Blob Storage with blob lease (D) supports locking because Terraform uses Azure's blob lease feature to prevent concurrent state writes. Amazon S3 with DynamoDB for locking (E) supports locking by using a DynamoDB table to coordinate and hold the lock while state is stored in S3. The local file system (B) does not provide remote locking suitable for team collaboration, and the HTTP backend (C) does not support state locking, so neither belongs among the correct answers.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Consul backend

    Why this is correct

    The Consul backend stores state in Consul's key-value store and uses Consul's session mechanism to acquire a lock, preventing concurrent Terraform runs from corrupting state. This satisfies the stem's state-locking requirement alongside remote storage for team collaboration.

  • ✗

    Local file system

    Why it's wrong here

    The local backend writes state to a file on the operator's machine, offering no remote sharing and no locking mechanism at all. It is tempting for solo experimentation because it needs zero configuration, and would be correct for a single engineer practising Terraform locally without collaboration.

  • ✗

    HTTP backend

    Why it's wrong here

    The HTTP backend stores state remotely but implements no locking protocol, so concurrent runs can corrupt state. It is tempting because it does satisfy the remote-storage requirement and works with custom REST endpoints, and would be correct if only remote persistence, not locking, were needed.

  • ✓

    Azure Blob Storage with blob lease

    Why this is correct

    Azure Blob Storage supports Terraform state locking through blob leases, which acquire an exclusive lock on the state blob. This satisfies the locking requirement alongside remote storage, unlike backends such as plain HTTP or S3 without DynamoDB.

  • ✓

    Amazon S3 with DynamoDB for locking

    Why this is correct

    S3 alone cannot lock state; pairing it with a DynamoDB table provides the locking mechanism Terraform requires. DynamoDB's conditional writes guarantee only one user holds the lock, satisfying the team-collaboration and state-locking constraint in the stem.

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

Courseiva writes every CV0-004 question from scratch — 834 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.