Skip to content

Terraform State Management Questions

Practice questions for Terraform State Management topic in HashiCorp Certified: Terraform Associate (004). 36 questions covering this domain.

36 questions8 easy17 medium11 hard
Q1
medium

Which statement about Terraform backends is correct?

Q2
hard

A team wants to keep remote backend credentials out of version control and fill in some settings only during initialization. Which approach is support...

Q3
easy

Which backend does Terraform use by default when no other backend or cloud integration is configured?

Q4
medium

What is the purpose of state locking?

Q5
medium

What do Terraform CLI workspaces provide in a single working directory?

Q6
medium

Why is remote state storage usually better than local state for a team?

Q7
easy

If no backend is configured, where does Terraform store state by default?

Q8
hard

A practitioner wants Terraform to refresh recorded state to match real infrastructure and persist that update without making normal configuration chan...

Q9
easy

What is state drift in Terraform?

Q10
medium

Why does Terraform keep dependency metadata in state even after you remove a resource from configuration?

Q11
medium

Why must each imported remote object map to only one Terraform resource instance?

Q12
medium

What is the main reason Terraform stores cached attribute values in state?

Q13
hard

Why is deleting an old moved block from a module potentially dangerous?

Q14
medium

When multiple aliased provider configurations exist, what additional metadata can Terraform keep in state for a resource?

Q15
easy

What does a removed block with lifecycle destroy = false do?

Q16
hard

A resource previously had prevent_destroy = true, but its resource block is later removed from configuration. What is the important caveat?

Q17
hard

A module author renames aws_instance.old to aws_instance.new and adds a moved block from the old address to the new address. What should happen on the...

Q18
medium

A resource previously had no count argument, and the new version adds count = 3. Without an explicit moved block, where does Terraform automatically p...

Q19
hard

Can a moved block convert a managed resource into a data source?

Q20
medium

A module call is renamed from module.a to module.b and a moved block records the change. What happens on the next plan?

Sign in to see all 36 questions

Create a free account to browse all questions — completely free during our launch phase.