- 1 Introduction to Infrastructure as Code (IaC) & Terraform Basics The "Why" Before the "How": What is IaC and Why Terraform?Setting up the Terraform Environment: CLI & Editor ConfigurationYour First Configuration: "Hello World" in TerraformThe Core Workflow: init, plan, apply, destroy
- 2 HCL (HashiCorp Configuration Language) Fundamentals Blocks, Arguments, and Expressions: The Syntax of HCLProviders: Connecting Terraform to the CloudResources: Building Your Infrastructure BlocksData Sources: Fetching Existing Infrastructure Data
- 3 Variables and Outputs: Making Configurations Dynamic Input Variables: Parameterizing Your CodeVariable Types and Validation (Strings, Lists, Maps, Objects)Local Values: Keeping Code DRY with Internal VariablesOutput Values: Extracting Data from Your Deployments
- 4 Terraform State: The Brain of Your Infrastructure Understanding terraform.tfstate: How Terraform Tracks RealityLocal vs. Remote State: Why You Need Remote BackendsConfiguring an S3/Azure Storage Remote Backend with State LockingManaging State Practically: import, rm, taint, and untaint
- 5 Modules: Reusable Infrastructure Components Introduction to Modules: Don't Repeat Yourself (DRY)Consuming Public Modules from the Terraform RegistryCreating Your First Custom Local ModulePassing Inputs and Extracting Outputs from Modules
- 6 Advanced HCL & Logic Conditional Expressions: If-This-Then-That in TerraformThe count Meta-Argument: Creating Multiple Resources ConditionallyThe for_each Meta-Argument: Iterating over Maps and SetsDynamic Blocks: Generating Nested Configurations on the Fly
- 7 Provisioners and Bootstrapping When (and When NOT) to Use ProvisionersThe local-exec Provisioner: Running Local ScriptsThe remote-exec Provisioner: Running Commands on InstancesUsing cloud-init/user-data for Instance Bootstrapping (The Preferred Way)
- 8 Managing Multiple Environments Workspaces: Managing Multiple Environments in a Single DirectoryDirectory Separation: The Enterprise Way to Structure EnvironmentsUsing .tfvars Files for Environment-Specific ConfigurationsBest Practices for Environment Isolation and State Separation
- 9 Secrets Management in Terraform The Danger Zone: Why You Shouldn't Hardcode SecretsUsing Environment Variables (TF_VAR) for Sensitive DataMarking Variables and Outputs as SensitiveIntegrating with Secret Managers (AWS Secrets Manager / Vault)
- 10 Collaboration and CI/CD for Terraform Version Control for Terraform: Git Best Practices and .gitignoreAutomated Code Formatting and Validation (fmt & validate)Integrating Terraform into GitHub Actions / GitLab CITerraform Cloud Basics: Remote Operations and Run Triggers
- 11 Testing and Security Guardrails Static Code Analysis: Securing Code with tfsec or CheckovCost Estimation: Catching Surprises with InfracostAutomated Testing: Introduction to TerratestPolicy as Code: Enforcing Guardrails with Sentinel or OPA