
Terraform lets you describe your cloud infrastructure in code and apply it reproducibly. This series is AWS-oriented: every example creates real resources — VPCs, EC2 instances, load balancers, RDS databases — that you can destroy with a single command at the end of each lab.
You begin with the workflow (init, plan, apply, destroy), the structure of a configuration file, providers and resources, and remote state stored on S3. The language chapters then cover variables, locals, outputs, data sources, conditional expressions, dynamic blocks and the two loop constructs, count and for_each.
The infrastructure chapters assemble those bricks into production patterns: EBS volumes, ELB, IAM, RDS, Route 53, autoscaling groups, and a full VPC written first without and then with modules. The Modules lesson — the longest of the series — shows how to design, version and reuse your own modules.
Prerequisites: an AWS account with programmatic access and the AWS CLI configured. Terraform 1.x is assumed; where syntax changed across versions, the lesson tells you.
How to use this hub. Lessons are ordered as a learning path: start at 01 and follow the arrows, or jump to any chapter. 26 lessons, free, no account required.
Learning path
Fundamentals
- Terraform overview
- Terraform installation and AWS setup
- Terraform language basics (HCL)
- Terraform workflow: init, plan, apply, destroy
- Terraform blocks
- Providers and resources
- Remote state on S3
Language features
- Variables
- Locals
- Data sources
- Variables and data sources — worked example
- Conditional expressions
- Dynamic blocks
- Loops: count, for_each and for expressions
- Provisioners
- Workspaces
Building AWS infrastructure
- EBS volumes
- Elastic Load Balancer
- IAM users, roles and policies
- RDS database
- Route 53 hosted zones
- Autoscaling groups