$ /courses/terraform/interview
Not a Top-30 with a list of answers. Each question is a card: what they want to hear, the usual traps, a follow-up, and links into the knowledge base for depth. Right now 47 questions across 8 clusters.
Each cluster is an independent topic. Open the one you're weakest on, or go in order.
/core-hcl
6 questionsHCL semantics and types: type coercion, splat, the dynamic block, conditionals, for-expressions, references, and the graph resolver. What "known after apply" means and why it gets annoying. Junior-level questions plus a couple of traps for mid-level candidates.
/state
7 questionsThe most common topic in a Terraform interview. State is what sets Terraform apart from kubectl apply. What it holds, why you need a lock, how to catch drift, and when state surgery is acceptable. These come from real DevOps interviews: AWS teams, banks, mid-size infrastructure teams.
/modules
6 questionsA module's boundary of responsibility, sources (local, registry, git, s3), version pinning and semver, composition vs a flat root, the usual antipatterns. What a lead wants to hear: where to draw the boundary and why.
/workflow-cicd
6 questionsWhat happens between plan and apply. Why fmt and validate belong in the pipeline. How to reach AWS from GitHub Actions without long-lived keys. Drift detection, require-approval, splitting state by environment. Questions for DevOps/SRE roles.
/providers-resources
6 questionsThe provider block, alias, multi-region. Resource lifecycle (create_before_destroy, prevent_destroy, ignore_changes), count vs for_each, data vs resource, and depends_on when it is honestly needed. The grammar of everyday Terraform work.
/testing-policy
5 questionsWhat to test in Terraform and with what. The built-in `terraform test`, terratest, tflint, checkov, trivy, OPA/conftest, terraform-compliance. The test pyramid for IaC. Where each tool fits, and where it is overkill.
/refactoring-large
5 questionsWhat to do when a monolithic root has grown to 3000 resources and plan takes seven minutes. The moved/removed blocks, splitting state across workspaces and separate roots, zero-downtime migration. Senior questions from real migrations at banks and large product teams.
/troubleshooting-debug
6 questionsWhat to do when `plan` fails with a vague error. Reading TF_LOG, the common errors (cycle, inconsistent dependency lock, provider auth). terraform console for debugging expressions, reading a plan diff, and terraform graph when you actually need it.