Domain 2 of 8 · Chapter 4 of 4

How Terraform uses and manages state

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing HashiCorp Certified: Terraform Associate premium course — no separate purchase.

14-day money-back guarantee — no questions asked.

Included in this chapter:

  • What state is and what it records
  • State, refresh, and the attribute cache
  • Protecting state: secrets and locking
  • Exam-pattern recognition

Cheat sheet

  • State maps configuration to real objects
  • Default local state is terraform.tfstate JSON
  • State is updated after apply
  • State records metadata and dependencies
  • State caches resource attributes
  • -refresh=false uses cached state
  • State is plaintext and includes secrets
  • sensitive does not remove values from state
  • State locking is automatic

Unlock with Premium — includes all practice exams and the complete study guide.

Also tested in

References

  1. Purpose of Terraform State
  2. State
  3. Command: plan
  4. Sensitive Data in State
  5. State Locking