Infrastructure as Code
Automated infrastructure provisioning and configuration management with Terraform and Ansible
Infrastructure as Code
Infrastructure as Code (IaC) manages infrastructure through machine-readable definition files rather than manual processes. This enables version control, peer review, reproducibility, and automation of infrastructure changes.
Overview
| Tool | Category | Approach | Language |
|---|---|---|---|
| Terraform | Provisioning | Declarative | HCL |
| Ansible | Configuration Management | Procedural (YAML tasks) | YAML + Jinja2 |
| Pulumi | Provisioning | Imperative (general-purpose languages) | TypeScript, Python, Go |
| CloudFormation | Provisioning (AWS only) | Declarative | JSON / YAML |
Topics
- Terraform - Cloud infrastructure provisioning with HashiCorp Configuration Language. Organized from basics to advanced patterns:
- Getting Started - install, first config, init/plan/apply
- Core Concepts - providers, resources, variables, outputs, data sources
- State Management - remote backends, locking, state operations
- Modules - reusable building blocks, registry, versioning
- Advanced Patterns - meta-arguments, dynamic blocks, expressions, lifecycle
- Best Practices - project layout, CI/CD, security, testing, drift detection
- Ansible - Agentless configuration management and application deployment. Organized from basics to advanced patterns:
- Getting Started - install, inventory, first playbook
- Core Concepts - inventory, plays, tasks, modules, variables, facts
- Roles & Templates - reusable roles, Jinja2 templates, handlers
- Advanced Patterns - Vault, dynamic inventory, conditionals, rolling deploys
- Best Practices - project layout, CI/CD, Molecule testing, Terraform integration