0
0
Terraformcloud~5 mins

State disaster recovery in Terraform - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Terraform state and why is it important?
Terraform state is a file that keeps track of the resources Terraform manages. It helps Terraform know what exists so it can update or delete resources correctly.
Click to reveal answer
beginner
What is state disaster recovery in Terraform?
State disaster recovery means having a backup plan for your Terraform state file so you can restore it if it gets lost or corrupted.
Click to reveal answer
intermediate
Name one common method to protect Terraform state from loss.
Using remote state storage like AWS S3 with versioning enabled to keep backups of the state file.
Click to reveal answer
intermediate
Why should Terraform state be stored remotely and not locally?
Remote storage allows multiple team members to share the state safely and enables backups and locking to prevent conflicts.
Click to reveal answer
intermediate
What is state locking and how does it help in disaster recovery?
State locking prevents multiple people from changing the state at the same time, reducing the risk of corrupting the state file.
Click to reveal answer
What does Terraform state file track?
AUser credentials for cloud providers
BThe source code of Terraform modules
CThe current resources Terraform manages
DTerraform command history
Which of these is a best practice for Terraform state disaster recovery?
AStore state file only on local machine
BKeep state file in a public GitHub repo
CDelete state file after each run
DUse remote backend with versioning and locking
What feature helps prevent simultaneous changes to Terraform state?
AState locking
BState encryption
CState compression
DState splitting
If your Terraform state file is corrupted, what should you do?
ARestore from a backup version
BDelete all resources manually
CRun terraform init again
DIgnore and continue
Why is enabling versioning on remote state storage important?
AIt speeds up Terraform runs
BIt keeps copies of previous state files for recovery
CIt encrypts the state file
DIt allows multiple state files
Explain how you would set up Terraform state disaster recovery for a team project.
Think about storage, backups, and preventing conflicts.
You got /4 concepts.
    Describe what happens if Terraform state is lost and how disaster recovery helps.
    Consider the role of state in managing infrastructure.
    You got /4 concepts.