Infrastructure-as-code patterns and reference material for Terraform.
High-level overview of Terraform plus common commands, state operations, and workspace reference tables.
Quick-start guide for Terraform: the "Hello, World" equivalent, core workflow, and first EC2 deployment with terraform init, plan, apply, and destroy.
Why Terraform over click-ops, manual scripts, or other IaC tools, plus declarative configuration patterns and bootstrapping a web server with user_data.
Terraform HCL syntax deep-dive: resources, variables, outputs, data sources, security groups, auto-scaling, and load balancers with complete examples.
Terraform state management: remote backends (S3), state locking (DynamoDB), workspace isolation, remote state data sources, and file layout strategies.
Building reusable Terraform modules: inputs, outputs, module sources (local, Git), file layout conventions, versioning, and composing infrastructure from modules.
Terraform patterns for loops, conditionals, dynamic blocks, zero-downtime deployment strategies, and the moved block for safe refactoring.
Strategies for managing secrets with Terraform: KMS encryption, AWS Secrets Manager, IAM roles, OIDC federation, and keeping secrets out of state files.
Using multiple AWS regions, multiple AWS accounts (via IAM assume_role), and combining AWS + Kubernetes providers in a single Terraform configuration.
Building production-grade Terraform: small modules, precondition/postcondition validation, provisioners, null_resource, and external data sources.
Testing infrastructure code with Terratest: unit tests via plan validation, integration tests, end-to-end tests, OPA policy validation, and staged test patterns.
Working with Terraform as a team: Terragrunt for DRY configurations, CI/CD pipelines, code review workflows, environment isolation, and how to avoid common team pitfalls.