Course Outline
Module 1: Introduction to Infrastructure as Code and Terraform
- IaC concepts and their advantages for on-premises and hybrid environments.
- An overview of Terraform: providers, resources, state, and lifecycle.
- Installation of Terraform, Azure CLI, and necessary supporting tools.
- Initial practical exercise: creating and applying a simple Terraform configuration locally.
Module 2: HashiCorp Configuration Language (HCL) and Configuration Basics
- HCL syntax, including resources, attributes, and expressions.
- Defining variables, outputs, locals, and type constraints.
- Using the Terraform CLI: init, plan, apply, destroy, and fmt commands.
- Practical lab: developing a parameterised configuration for both an on-prem resource and an Azure resource.
Module 3: Providers, Resources, and Azure Provider Fundamentals
- Understanding providers and configuring them (specifically the AzureRM provider).
- Mapping infrastructure to Terraform resources (networking, compute, storage).
- Managing Azure authentication and service principals for automation.
- Hands-on task: provisioning an Azure virtual network and a basic VM via Terraform.
Module 4: State Management, Backends, and Collaboration
- Terraform state: its purpose, format, and lifecycle considerations.
- Implementing remote backends with Azure Storage Accounts and state locking strategies.
- Using workspaces, environments, and collaboration patterns for team workflows.
- Lab exercise: setting up remote state in Azure Storage and executing a multi-user workflow.
Module 5: Modularisation, Reusability, and Best Practices
- Creating and utilising Terraform modules.
- Managing module inputs/outputs, versioning, and registry patterns.
- Establishing folder layouts, naming conventions, and a maintainable repository structure.
- Practical exercise: developing a reusable module for an Azure VM with disk and network, then testing it across different environments.
Module 6: Managing Azure Virtual Devices and On-Prem Integration
- Managing Azure Virtual Machines, Virtual Desktop components, and device lifecycles via Terraform.
- Strategies for hybrid device management: connecting on-prem resources with Azure-managed devices.
- Integrating volumetric or device management systems using data sources and external providers.
- Lab: deploying an Azure VM fleet to represent operator units, configuring inventory tagging, and setting up basic monitoring.
Module 7: CI/CD, Automation, and Deployment Pipelines
- Integrating Terraform with CI/CD systems (GitHub Actions, Azure DevOps pipelines).
- Automating plan/apply processes using secured secrets and service principals.
- Fundamentals of Policy as Code (Sentinel or Open Policy Agent patterns) and pre-deployment checks.
- Practical exercise: creating a simple GitHub Actions workflow to plan and apply Terraform against a sandbox subscription.
Module 8: Security, Secrets, and Operational Practices
- Managing secrets via Azure Key Vault integration and preventing sensitive data in state files.
- Implementing access control, RBAC, and least privilege for automation accounts.
- Drift detection, state reconciliation, and basic remediation practices.
- Checklist covering backup, auditing, and governance for Terraform-managed infrastructure.
Module 9: Testing, Debugging, and Troubleshooting
- Debugging Terraform configurations and interpreting plan diffs effectively.
- Approaches to unit and integration testing (terraform validate, tflint, kitchen-terraform).
- Common error patterns and resolution strategies.
- Lab: executing validation and linting tools to identify and fix issues.
Module 10: Capstone Project — Hybrid Deployment Scenario
- Design exercise: planning an on-prem + Azure device deployment using learned patterns.
- Implementing core components using modules, remote state, and CI/CD pipeline snippets.
- Presenting the solution, discussing trade-offs, and reviewing the operational runbook.
Summary and Next Steps
Requirements
- A solid understanding of fundamental networking and virtualisation concepts.
- Proficiency with the Windows or Linux command line.
- Basic knowledge of cloud or on-premises infrastructure principles.
Target Audience
- System administrators and platform engineers.
- DevOps practitioners embarking on their journey with Infrastructure as Code.
- IT teams responsible for managing hybrid (on-prem + Azure) infrastructure.
Testimonials (3)
pacing for the most part was fantastic. Michal was very good at ensuring the audience were engaged and ensured everyone was following along for the most part
Asif Shaikh - Carpmaels & Ransford
Course - Terraform on Microsoft Azure
Checking all the details in practice - by writing real code
Michal Pipala - EY
Course - Advanced Terraform: Efficient Infrastructure as Code
the instructor was very well prepared