Terraform guides
Infrastructure as code, state, modules, providers. Free to read, no sign-up.
- 01
Terraform Fundamentals for DevOps
The Terraform mental model that makes everything else click: you declare the infrastructure you want, Terraform makes reality match and tracks it in state. Plus providers, resources, and the init/plan/apply/destroy workflow you actually use.
18 min read
- 02
Terraform State Explained
What Terraform state is and why it exists: the map from your config to real resource IDs, what lives in the file, drift, sensitive data, and the state commands.
18 min read
- 03
Terraform Variables, Outputs, and Locals
Terraform inputs and outputs done right: variable blocks with types, defaults, and validation, the precedence of tfvars and TF_VAR_ env vars, sensitive values, output values, and locals for DRY.
18 min read
- 04
Terraform Modules: Reusable Infrastructure
How Terraform modules turn repeated resource blocks into reusable, parameterized building blocks: writing, calling, sourcing, and versioning them the right way.
18 min read
- 05
Terraform Providers and Data Sources
How Terraform talks to real platforms: providers as plugins, version pinning and the lock file, configuring credentials safely, provider aliases, and reading existing infra with data sources.
16 min read
- 06
Terraform Meta-Arguments: count, for_each, and Lifecycle
Stop copy-pasting resource blocks. count vs for_each and the reindexing trap, depends_on, lifecycle (create_before_destroy, prevent_destroy, ignore_changes), and dynamic blocks.
18 min read
- 07
Managing Environments in Terraform
Run the same infrastructure across dev, staging, and prod without gluing them together. CLI workspaces vs directory-per-environment, their honest tradeoffs, and a layout that scales.
16 min read
- 08
Terraform Backends and Remote State
Why local state breaks teams, what a backend is, and the S3 plus DynamoDB pattern for remote state - with locking, encryption, migration, and remote_state outputs.
18 min read
- 09
Validating and Testing Terraform Code
Build confidence in Terraform the cheap-first way: fmt, validate, plan review, variable validation, linting, security scanning, policy as code, native tests, Terratest, and drift detection.
22 min read
- 10
Terraform in CI/CD and Team Workflows
Run Terraform from a pipeline, not laptops: plan on pull requests, apply the reviewed plan on merge, OIDC for credentials, remote state with locking, and prod approvals.
18 min read
Ready to test it?
The same topics, asked the way interviewers ask them: a real production incident and a decision you have to defend.
Terraform scenario interview questions