AInfraMinds

🚀 Introduction

In this post, we’ll walk through a practical example of deploying an Azure Virtual Machine using a reusable Terraform module, and orchestrating the inputs with Terragrunt.

Whether you’re spinning up a dev VM or preparing infrastructure for your next project, this setup is flexible, scalable, and clean — ideal for managing multiple environments with minimal duplication.


🔗 Code Repository

All source code is hosted publicly on GitHub:
📁 Terraform Module: tf-brickstack/azure-vm-module

📄 Terragrunt Configuration:
Refer to this sample config to see how inputs are passed:
👉 terragrunt.hcl


💡 Why This Setup?

This approach shows:


📦 What the Module Includes

This Terraform module provisions the following Azure resources:


🛠️ How Terragrunt Helps

Terragrunt is like a smart wrapper around Terraform.

You define your core infrastructure using Terraform — and use Terragrunt to:

Sample Terragrunt usage:

terraform {
  source = "git::https://github.com/vsaxena2711/tf-brickstack.git//azure-vm-module?ref=main"
}

inputs = {
  vm_name       = "vm-dev-001"
  location      = "East US"
  admin_user    = "azureuser"
  vm_size       = "Standard_B1s"
  rg_name       = "rg-dev-vm"
  vnet_name     = "vnet-dev"
  subnet_name   = "subnet-dev"
}
👉 Return to Code in Action 📦 Return to Infra World 🏠 Take Me Home

Copyright 2026. All rights reserved.