Course Outline
Module 1: Introduction to Infrastructure as Code and Terraform
- Core IaC concepts and their advantages for on-premises and hybrid environments.
- Terraform overview: providers, resources, state, and the resource lifecycle.
- Installation of Terraform, Azure CLI, and essential supporting tools.
- Initial practical exercise: writing and applying a basic Terraform configuration locally.
Module 2: HashiCorp Configuration Language (HCL) and Configuration Basics
- HCL syntax, defining resources, attributes, and expressions.
- Managing variables, outputs, locals, and type constraints.
- Utilising the Terraform CLI: init, plan, apply, destroy, and fmt commands.
- Practical lab: building a parameterized configuration for both an on-premises resource and an Azure resource.
Module 3: Providers, Resources, and Azure Provider Fundamentals
- Understanding the role of providers and configuring the AzureRM provider.
- Mapping physical infrastructure to Terraform resources (networking, compute, storage).
- Managing Azure authentication and service principals for automated tasks.
- Practical exercise: provisioning an Azure virtual network and a basic VM via Terraform.
Module 4: State Management, Backends, and Collaboration
- Terraform state: its purpose, file format, and lifecycle considerations.
- Implementing remote backends with Azure Storage Accounts and state locking strategies.
- Workspaces, environment separation, and collaboration patterns for teams.
- Lab: configuring remote state in Azure Storage and executing a multi-user workflow.
Module 5: Modularization, Reusability, and Best Practices
- Creating and consuming Terraform modules.
- Defining module inputs/outputs, versioning, and registry patterns.
- Best practices for folder layout, naming conventions, and maintaining repository structure.
- Practical exercise: developing a reusable module for an Azure VM, disk, and network, then testing 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.
- Patterns for hybrid device management: linking on-premises resources with Azure-managed devices.
- Integrating volume or device management systems using data sources and external providers.
- Lab: deploying a fleet of Azure VMs representing operator units, including inventory tagging and basic monitoring.
Module 7: CI/CD, Automation, and Deployment Pipelines
- Integrating Terraform with CI/CD systems (GitHub Actions, Azure DevOps pipelines).
- Automating plan and apply processes with secured secrets and service principals.
- Policy as Code basics (using Sentinel or Open Policy Agent patterns) and pre-deployment checks.
- Practical exercise: creating a GitHub Actions workflow to plan and apply Terraform configurations to a sandbox subscription.
Module 8: Security, Secrets, and Operational Practices
- Managing secrets via Azure Key Vault integration and preventing sensitive data leakage into state files.
- Implementing access control, RBAC, and least privilege for automation accounts.
- Drift detection, state reconciliation, and basic remediation techniques.
- Checklist for backup, auditing, and governance of Terraform-managed infrastructure.
Module 9: Testing, Debugging, and Troubleshooting
- Debugging Terraform configurations and interpreting plan diffs effectively.
- Approaches to unit and integration testing (using terraform validate, tflint, and kitchen-terraform).
- Common error patterns and effective resolution strategies.
- Lab: running validation and linting tools to identify and fix issues.
Module 10: Capstone Project — Hybrid Deployment Scenario
- Design exercise: planning an on-premises and Azure device deployment using learned patterns.
- Implementation of core components using modules, remote state, and CI/CD pipeline snippets.
- Presentation of the solution, discussion of trade-offs, and review of the operations runbook.
Summary and Next Steps
Requirements
- A foundational understanding of networking and virtualization principles.
- Competence with Windows or Linux command-line interfaces.
- Basic knowledge of cloud or on-premises infrastructure concepts.
Target Audience
- System administrators and platform engineers.
- DevOps practitioners new to Infrastructure as Code.
- IT teams overseeing hybrid (on-premises and 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