INTERMEDIATE · 8 MODULES · 64 LESSONS
Terraform and Infrastructure as Code
Stop creating AWS infrastructure by hand and declare it as code, so a single command can recreate or tear down the whole stack reproducibly.
- For you if
- You've created AWS resources command by command and want reproducibility, review, and history in Git.
- By the end
- You'll know how to write HCL, manage state and drift, import existing resources, and build reusable modules.
- You need
- The AWS core services guide, Docker, basic terminal skills, and a LocalStack account.

Curriculum
01Why Infrastructure As Code
- Introduction to the guide: from commands to code
- The trouble with imperative infrastructure
- What is infrastructure as code
- Terraform and its alternatives: why Terraform, what is OpenTofu
- Hands-on: installing Terraform and a clean start
- Hands-on: connecting Terraform to LocalStack
- Hands-on: your first resource, end to end
- Project: bootstrapping Andes Cargo's Terraform repository
02Hcl And The Terraform Workflow
- Introduction: reading and writing HCL with judgment
- Anatomy of an HCL block
- `resource` vs. `data`: creating vs. reading
- The dependency graph: implicit and explicit
- The `plan` → `apply` → `destroy` cycle, in depth
- Hands-on: `fmt` and `validate`
- Hands-on: proving idempotency
- Project: Andes Cargo's first declared resource
03Variables Outputs And Locals
- Introduction: from fixed values to parameterized configuration
- Input variables and types
- `.tfvars` files and precedence
- `locals` for computed values
- `output` and string interpolation
- The `random` provider, with a fixed seed
- Hands-on: parameterizing the Andes Cargo bucket
- Project: a configurable stack for Andes Cargo
04State The Source Of Truth
06Codifying Identity And Storage
- Introduction: the access and storage model, now in code
- Recap: Andes Cargo's identity and storage model
- IAM policies as declarative data
- Hands-on: declaring `LambdaManifestProcessorRole`
- Hands-on: declaring `AppServerRole`
- Bucket versioning and policy as separate resources
- Hands-on: declaring `andes-cargo-shipment-docs`
- Project: Andes Cargo's identity and storage as code
07Codifying Compute And Data
- Introduction: compute and data, now in code
- Recap: Andes Cargo's processing and data model
- Packaging Lambda code with `archive_file`
- Hands-on: declaring the Lambda function
- Hands-on: declaring the `Shipments` table
- Wiring the S3 trigger
- Hands-on: applying the full pipeline
- Project: Andes Cargo's pipeline as code
08Capstone The Andes Cargo Platform As Code
- Introduction to the capstone
- Architecture review: the full stack as code
- End-to-end: recreate from zero
- `plan` as a PR review, and `apply` guardrails
- Blast radius: the Claude Code `destroy` incident
- Hands-on: the same code with OpenTofu
- What Andes Cargo still needs
- Final project: Andes Cargo's infrastructure as a deliverable
Reviews
What students say
These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.
No approved reviews yet.
Be the first to share your experience!