TF-Associate-004 - Terraform state management - Section 6a

Describe the local backend.

The default local backend stores state as a file on disk (terraform.tfstate) and runs operations on the local machine. Candidates should understand its limits for teams (no locking across people, state on one machine) and why remote state is preferred for collaboration.

local backendterraform.tfstate on diskdefault backendlimits for teams

Practice question for this objective

Free sampleTerraform state managementeasy

Which description best captures the role of the local backend within Terraform's backend system?

  • AIt is an add-on backend that must be installed as a separate plugin before it can store state.
  • BIt is a backend that streams state to standard output so it can be piped into another tool.
  • CIt is a read-only backend used to inspect state that some other backend has written.
  • DIt is a backend that stores state on the local filesystem and performs operations on the local machine. Correct
The local backend is the built-in default that stores state on the local filesystem and runs operations on the local machine. A backend in Terraform determines where state is stored and where operations execute, and the local backend, which is built in and used by default, keeps state in a file on the local filesystem while running plan and apply on the same machine.

Why A is wrong: The local backend is built in and needs no installation; confusing it with provider plugins makes this tempting but wrong.

Why B is wrong: State is persisted to a file, not streamed to standard output, so this misdescribes how the local backend behaves.

Why C is wrong: The local backend both reads and writes state during operations, so calling it read-only is incorrect.

Why D is correct: The local backend keeps state as a file on the local filesystem and executes plan and apply operations on the machine running Terraform, which is exactly its role.

See more TF-Associate-004 practice questions, answers explained.

More in this domain

Back to all Terraform state management objectives, or the TF-Associate-004 cert hub.

Examworthy is not affiliated with or endorsed by HashiCorp. Original, blueprint-aligned practice material only.