Build Azure lab environments using Terraform. Journey into mastering infrastructure as code by creating a real-world cloud architecture that can also be used as a learning lab. Gain hands-on experience with tools like GitHub, Azure DevOps pipelines, and configuring virtual machines. This project focuses on incremental learning to develop skills one step at a time. 🚀🌐🧭
- Start with smaller, independent modules for easier testing and debugging.
- EXAMPLE 1:
.\v-network.md
(Lab Network - Base for remaining modules) - EXAMPLE 2:
.\modules\vm-jumpbox
(Windows Client and Linux Desktop)- NOTE: Full automation of jumpbox capabilities are "WIP"
- EXAMPLE 3:
.\modules\vm-dc1
(Domain Controller with Dev Tools) - EXAMPLE 4:
.\modules\sql-ha
(Domain Controller w/ SQL Always On Cluster)
- EXAMPLE 1:
- Utilize Terraform state management for consistent deployments.
- Follow IaC best practices for clean and maintainable code.
- Look for *.md files, comments ('#'), and instructions (more '#' & '/') throughout!
... me too!
- Install Terraform on Windows with Azure PowerShell
- Write basic Terraform scripts to interact with Azure services.
- Build your Azure network with Terraform, testing components like VNETs and subnets.
- Quickstart: Use Terraform to create a Windows VM
- Link your Azure account with your GitHub repository.
- Set up GitHub Actions for automated workflows.
- Connect your GitHub repository with Azure DevOps.
- Prepare Azure DevOps for pipeline creation and Terraform integration.
- Write a YAML pipeline for Terraform deployments and test it.
- Use Terraform to create and destroy a sub-tenant for controlled deployments.
- Apply simple configurations like Azure AD, storage blobs, or basic applications (e.g., WordPress).
- Destroy them afterwards for a solid foundation.
- With each apply/destroy cycle, build upon previous components, creating a more complex lab.
- Use Git branches to manage different stages of your lab's evolution.
- Continuously learn and add new features, exploring advanced Terraform techniques and community resources.
- Terraform Azure | HashiCorp
- Terraform Azure | Microsoft
- Create on-premises virtual network in Azure using Terraform
- Quickstart: Create a lab in Azure DevTest Labs using Terraform
- Quickstart: Use Terraform to create a Windows VM - Azure Virtual Machines
- Deploying an Azure Windows VM using Terraform IaC
- Azure - Provisioning a Windows Virtual Machine using Terraform
- The Infrastructure Developer's Guide to Terraform: Azure Edition
- Terraform on Azure | Udemy
Contributions are welcome! Please open an issue or submit a pull request if you have suggestions or enhancements.
This script is distributed without any warranty; use at your own risk. This project is licensed under the GNU General Public License v3. See GNU GPL v3 for details.