Course Outline
Module 1: Introduction to Infrastructure as Code and Terraform
- Exploring IaC concepts and their advantages in on-premises and hybrid settings.
- An overview of Terraform, covering providers, resources, state management, and the resource lifecycle.
- Installation of Terraform, Azure CLI, and other necessary tools.
- Initial practical exercise: creating and applying a basic Terraform configuration locally.
Module 2: HashiCorp Configuration Language (HCL) and Configuration Basics
- Diving into HCL syntax, including resources, attributes, and expressions.
- Working with variables, outputs, locals, and type constraints.
- Mastering the Terraform CLI commands: init, plan, apply, destroy, and fmt.
- Practical lab: developing a parameterized configuration for both an on-prem resource and an Azure resource.
Module 3: Providers, Resources, and Azure Provider Fundamentals
- Understanding the role of providers and configuring them, specifically the AzureRM provider.
- Mapping real-world infrastructure (networking, compute, storage) to Terraform resources.
- Handling Azure authentication and setting up service principals for automated workflows.
- Practical exercise: provisioning an Azure virtual network and a basic VM using Terraform.
Module 4: State Management, Backends, and Collaboration
- Understanding the purpose, format, and lifecycle of Terraform state.
- Implementing remote backends with Azure Storage Accounts and strategies for state locking.
- Utilizing workspaces, environments, and best collaboration patterns for teams.
- Lab: setting up remote state in Azure Storage and simulating a multi-user workflow.
Module 5: Modularization, Reusability, and Best Practices
- Creating and utilizing Terraform modules for better code structure.
- Managing module inputs/outputs, versioning, and using registry patterns.
- Establishing effective folder layouts, naming conventions, and maintainable repository structures.
- Hands-on task: building a reusable module for an Azure VM with disk and network components, then testing it across different environments.
Module 6: Managing Azure Virtual Devices and On-Prem Integration
- Controlling the lifecycle of Azure Virtual Machines and Virtual Desktop components via Terraform.
- Strategies for hybrid device management, including connecting 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 to simulate operator units, including inventory tagging and basic monitoring setup.
Module 7: CI/CD, Automation, and Deployment Pipelines
- Integrating Terraform with CI/CD platforms like GitHub Actions and Azure DevOps pipelines.
- Automating plan and apply processes while securing secrets and using service principals.
- Introduction to Policy as Code using Sentinel or Open Policy Agent patterns, along with pre-deployment checks.
- Hands-on exercise: building a simple GitHub Actions workflow to plan and apply Terraform changes to a sandbox subscription.
Module 8: Security, Secrets, and Operational Practices
- Managing sensitive data securely through Azure Key Vault integration and preventing leaks in state files.
- Implementing access controls, RBAC, and the principle of least privilege for automation accounts.
- Detecting drift, reconciling state, and applying basic remediation techniques.
- Reviewing a checklist for backup, auditing, and governance of Terraform-managed infrastructure.
Module 9: Testing, Debugging, and Troubleshooting
- Effectively debugging Terraform configurations and interpreting plan diffs.
- Approaches to unit and integration testing using tools like terraform validate, tflint, and kitchen-terraform.
- Identifying common error patterns and applying resolution strategies.
- Lab: executing validation and linting tools and resolving any issues found.
Module 10: Capstone Project — Hybrid Deployment Scenario
- Design challenge: planning an on-prem + Azure device deployment using the patterns learned in the course.
- Implementing core components using modules, remote state, and CI/CD pipeline snippets.
- Presenting the solution, discussing trade-offs, and reviewing operational runbooks.
Summary and Next Steps
Requirements
- Foundational knowledge of networking and virtualization concepts.
- Comfort with navigating Windows or Linux command-line interfaces.
- Basic understanding of cloud and on-premises infrastructure principles.
Target Audience
- System administrators and platform engineers.
- DevOps practitioners starting their journey with Infrastructure as Code.
- IT teams responsible for managing hybrid infrastructure combining on-premises and Azure resources.
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