Course Outline
Module 1: Foundations of Infrastructure as Code and Terraform
- The concept and advantages of IaC in on-premises and hybrid setups.
- An overview of Terraform: providers, resources, state, and the resource lifecycle.
- Setting up Terraform, Azure CLI, and other essential tools.
- First practical exercise: creating and applying a basic Terraform configuration locally.
Module 2: HashiCorp Configuration Language (HCL) and Core Configuration
- HCL syntax, resource definitions, attributes, and expressions.
- Working with variables, outputs, locals, and type constraints.
- Using the Terraform CLI for core commands: init, plan, apply, destroy, and fmt.
- Hands-on lab: developing a parameterized configuration for both an on-prem resource and an Azure resource.
Module 3: Providers, Resources, and the Azure Provider
- Understanding providers and configuring the AzureRM provider.
- Translating real-world infrastructure (networking, compute, storage) into Terraform resources.
- Handling Azure authentication and service principals for automated tasks.
- Practical task: provisioning an Azure virtual network and a basic VM using Terraform.
Module 4: State Management, Backends, and Team Collaboration
- The role, structure, and lifecycle of Terraform state.
- Configuring remote backends using Azure Storage Accounts and implementing state locking.
- Managing workspaces, environments, and collaborative workflows for teams.
- Lab: setting up remote state in Azure Storage and executing a multi-user workflow.
Module 5: Modularization, Reusability, and Best Practices
- Creating and utilizing Terraform modules effectively.
- Managing module inputs, outputs, versioning, and registry usage.
- Establishing clean folder layouts, naming conventions, and maintainable repository structures.
- Hands-on: building a reusable module for Azure VMs, disks, and networking, and testing it across different environments.
Module 6: Managing Azure Virtual Devices and On-Prem Integration
- Controlling Azure Virtual Machines, Virtual Desktop components, and device lifecycles via Terraform.
- Strategies for hybrid device management: linking on-prem resources with Azure-managed devices.
- Integrating volumetric or device management systems using data sources and external providers.
- Lab: deploying a fleet of Azure VMs to represent operator units, including inventory tagging and basic monitoring setup.
Module 7: CI/CD, Automation, and Deployment Pipelines
- Connecting Terraform to CI/CD tools like GitHub Actions and Azure DevOps pipelines.
- Automating plan and apply processes using secured secrets and service principals.
- Introducing Policy as Code (e.g., Sentinel or Open Policy Agent) and pre-deployment checks.
- Hands-on: developing a GitHub Actions workflow to plan and apply Terraform changes in a sandbox subscription.
Module 8: Security, Secrets, and Operational Best Practices
- Managing secrets via Azure Key Vault and preventing sensitive data leakage in state files.
- Implementing access control, RBAC, and least-privilege principles for automation accounts.
- Techniques for drift detection, state reconciliation, and basic remediation.
- Checklist for backup, auditing, and governance of Terraform-managed infrastructure.
Module 9: Testing, Debugging, and Troubleshooting
- Debugging Terraform configurations and interpreting plan diffs accurately.
- Approaches to unit and integration testing using tools like terraform validate, tflint, and kitchen-terraform.
- Identifying common error patterns and strategies for resolution.
- Lab: running validation and linting tools to identify and fix configuration issues.
Module 10: Capstone Project — Hybrid Deployment Scenario
- Design exercise: planning an on-prem + Azure device deployment using previously learned patterns.
- Implementing core components with 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 foundational understanding of basic networking and virtualization principles.
- Comfort working with either Windows or Linux command-line interfaces.
- Basic familiarity with cloud or on-premises infrastructure concepts.
Target Audience
- System administrators and platform engineers.
- DevOps practitioners starting 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