Terraform Associate 004 #10 Practice Exam: 50 Questions Across the Full Scope with Explanations

20 min read

This is the final part of the series: a practice exam covering the full scope. The approach is the same as in the GitHub Foundations practice exam.

  • Aim to finish within 60 minutes (the same time as the real exam, with a similar question density)
  • Resist checking the explanation after each question — grade yourself after finishing all of them
  • 35 or more questions (70%) count as ready to book (the actual passing line is not published; this is a conservative bar)
  • If a weak domain shows up, go back to the matching part (#2–#9) and review

Domain distribution #

DomainQuestionsRange
IaC concepts and Terraform’s purpose (#2)6Q1–Q6
Fundamentals: versions and providers (#3)6Q7–Q12
Core workflow (#4)8Q13–Q20
State management (#5)8Q21–Q28
Modules (#6)6Q29–Q34
Writing configuration and custom conditions (#7)7Q35–Q41
New scope: ephemeral and meta-arguments (#8)5Q42–Q46
HCP Terraform (#9)4Q47–Q50

IaC Concepts and Terraform’s Purpose (Q1–Q6) #

Q1. Which of the following is not a benefit of IaC (Infrastructure as Code)?
Q2. Which statement most accurately describes Terraform’s configuration model?
Q3. What do you call the property that running Terraform apply multiple times with the same configuration produces the same result?
Q4. What is the structural reason Terraform can support so many clouds and SaaS products?
Q5. Which best describes the fundamental purpose of Terraform state?
Q6. What is HashiCorp’s official position on provisioners?

Fundamentals: Versions and Providers (Q7–Q12) #

Q7. What range does the version constraint ~> 6.2 allow?
Q8. Which statement about the .terraform.lock.hcl file is correct?
Q9. Which command upgrades the provider versions recorded in the lock file to the latest within the allowed range?
Q10. How do you use the same AWS provider twice with different region settings?
Q11. Which is the recommended way to manage provider credentials?
Q12. Which statement about the .terraform directory is correct?

Core Workflow (Q13–Q20) #

Q13. What are the three stages of the Terraform core workflow as HashiCorp defines it?
Q14. Which situation does not require re-running terraform init?
Q15. How do you apply exactly what you reviewed in plan, with no changes slipping in between?
Q16. What is the current way to force a single resource you suspect is damaged to be recreated on the next apply?
Q17. Which statement about the -target flag is most accurate?
Q18. Which statement about terraform validate is correct?
Q19. Which setting writes the most detailed Terraform debug logs to a file?
Q20. Which command does the same thing as terraform destroy?

State Management (Q21–Q28) #

Q21. With the default (local backend) behavior, where is state stored?
Q22. Which is not an advantage that a remote backend provides over local state?
Q23. You run apply and get “Error acquiring the state lock”. What should you do first?
Q24. Which statement about terraform force-unlock is correct?
Q25. What happens when you run terraform state rm?
Q26. What is the declarative way to rename a resource block while avoiding recreation?
Q27. What is the current standard for bringing an existing resource that was first created in the console under Terraform management?
Q28. Which statement about the value of a variable marked sensitive = true is correct?

Modules (Q29–Q34) #

Q29. What is the root module in Terraform?
Q30. For which source is the version argument of a module block valid?
Q31. How does the calling side read a value that a child module created?
Q32. After adding a new module block, plan fails with a “Module not installed” error. What is the fix?
Q33. Which statement about the verified badge on the public registry is correct?
Q34. What happens if you do not specify version for a registry module?

Writing Configuration and Custom Conditions (Q35–Q41) #

Q35. When values arrive for the same variable through multiple channels, which one is applied in the end?
Q36. Which statement about locals is correct?
Q37. You want to read a user-data script file while substituting variables into it. Which function fits?
Q38. Which command lets you experiment with expression results interactively without an apply?
Q39. Inside a resource’s lifecycle block, what validates “assumptions that must hold before this resource is evaluated”?
Q40. Which keyword references the resource’s own attributes inside a postcondition?
Q41. Which custom condition leaves only a warning on failure instead of blocking apply?

New Scope: ephemeral and Meta-Arguments (Q42–Q46) #

Q42. Which statement about ephemeral values is correct?
Q43. How do you later rotate the value of a write-only argument such as password_wo on aws_db_instance?
Q44. When is using depends_on justified?
Q45. With resources created from a list-based count, what happens when you remove an element from the middle of the list?
Q46. Which setting blocks, at the Terraform level, a production database from accidentally being included in a deletion plan?

HCP Terraform (Q47–Q50) #

Q47. Which statement about HCP Terraform workspaces is correct?
Q48. What is the standard way to supply common cloud credentials to multiple workspaces?
Q49. Which Sentinel policy level blocks on violation but allows an authorized person to override and proceed?
Q50. What is Terraform Enterprise?

Scoring and Next Steps #

35 or more questions (70%) counts as ready to book. For the questions you missed, find the matching part in the domain distribution table and go back — in particular, the custom conditions in #7 and the new scope in #8 are new in 004, so if your wrong answers cluster there, reinforce those first. Before booking, I recommend going through the official study guide and the sample questions once to get familiar with how the exam phrases things.

The series-guided study ends here. The 26-part Terraform basics, practice, and operations track that this certification line is built on carries the practical depth, so whenever exam prep surfaces a concept your hands do not remember, drop down to the track anytime and pair it with hands-on work. Good luck on the exam.

X