Terraform
Learn Terraform from beginner to advanced with hands-on examples: a local first project, HCL, variables, providers, AWS resources, dependencies, loops, modules, remote state and locking, environment isolation, imports and refactoring, testing, secrets, CI/CD, troubleshooting, and a production capstone.
16 lessons · about 0.6 hours
Start the first lesson →- 01Terraform: Start Here Understand infrastructure as code, the plan/apply workflow, and the learning path from local experiments to team operations.
- 02Your First Terraform Project Install Terraform and create, change, inspect, and destroy a local file without using a cloud account.
- 03HCL, Resource Addresses, and Project Layout Read Terraform blocks, expressions, references, and version constraints, and organize a root module clearly.
- 04Variables, Locals, Outputs, and Validation Build a configurable local lab with typed inputs, useful outputs, and clear validation errors.
- 05Providers and Your First AWS Resources Configure AWS safely and provision a private, versioned S3 bucket with explicit resource settings.
- 06Dependencies, Data Sources, and Resource Lifecycle Understand the dependency graph, read existing infrastructure, and reason about replacements and lifecycle safeguards.
- 07Count, for_each, Functions, and Stable Identities Create repeated resources with predictable addresses and avoid accidental changes caused by list indexes.
- 08Reusable Modules and Clear Interfaces Build and call a small module, expose outputs, and define sensible module ownership and versioning.
- 09State, Remote Backends, and Locking Share state through S3, enable native locking, migrate safely, and protect recovery data.
- 10Environments, Workspaces, and Multiple Accounts Separate development and production ownership, understand workspace limits, and configure provider aliases.
- 11Imports, Moved Blocks, and Safe Refactoring Adopt existing infrastructure, rename resources without recreating them, and remove ownership deliberately.
- 12Testing, Preconditions, and Policy Checks Use validation, lifecycle conditions, Terraform tests, and policy checks to catch different classes of errors.
- 13Secrets, Ephemeral Values, and Least Privilege Protect credentials and state, distinguish sensitive from ephemeral values, and use provider-supported write-only inputs.
- 14CI/CD and Reviewed Production Changes Design an automated plan and apply workflow with protected credentials, saved plans, serialization, and drift checks.
- 15Drift, Troubleshooting, and Disaster Recovery Diagnose common failures, recover after partial applies, and operate state without destructive guesswork.
- 16Production Capstone and Interview Practice Combine modules, isolated environments, remote state, tests, and reviewed delivery in a production-style storage project.