← All topics
Terraform

Provision and manage infrastructure as code, end to end.

7 chapters40 interview Qs
1
Course chapters
Read in order — each chapter builds on the last, with a knowledge check at the end.
01
Foundations & IaC Concepts
What Infrastructure as Code actually solves, declarative vs imperative thinking, where Terraform fits next to CloudFormation/Pulumi/CDK, and how Terraform's provider plugin architecture works under the hood.
read →
02
Terraform Workflow & CLI
The init → plan → apply → destroy loop in depth, the CLI commands you'll actually use daily, how to read an execution plan safely, and how to use -target/-var/-var-file/-auto-approve without shooting yourself in the foot.
read →
03
Configuration Language (HCL) Basics
Blocks, arguments, and expressions from first principles, formatting and style conventions, the real difference between a resource and a data source, and how to design outputs that are actually reusable.
read →
04
Variables, Locals, and Outputs
Input variable types and validation, every place a value can come from (tfvars, auto.tfvars, TF_VAR_ env vars), when to reach for locals instead of repeating an expression, and how to design outputs that hold up across environments.
read →
05
Expressions, Functions, and Dynamic Blocks
Built-in functions across strings, collections, and encoding; conditional and splat expressions; count vs for_each for looping over resources; and dynamic blocks for generating repeated nested configuration.
read →
06
State Management
Why terraform.tfstate is the single most critical file in any Terraform project, local vs remote backends (S3+DynamoDB, Azure Storage, GCS, Terraform Cloud), state locking, the full state subcommand toolkit, importing existing resources, and handling sensitive data in state.
read →
07
Providers and Authentication
Configuring cloud providers with version constraints, and the real authentication patterns for AWS, Azure, and GCP — IAM roles, service principals, workload identity, and OIDC for CI/CD — plus multi-account and multi-provider setups.
read →
2
Interview prep
Basics and advanced questions, phrased the way interviewers actually ask them.