Skip to main content

Infrastructure as Code — Azure Deployment Stacks

Workshop Edition — Enterprise IaC Strategy
Purpose: Architectural guidance for Bicep, Deployment Stacks, and layered deployment patterns


📚 Solution Documents

#DocumentDescriptionAudience
1Deployment Stacks GuidanceComplete architectural guidance — Stacks vs Standard deployments, layered model, What-If, CI/CD patterns, decision matricesPlatform Engineering, Cloud Architecture, DevOps

🎯 Key Concepts

The Layered Deployment Model

Core Decision

QuestionAnswer
Are Deployment Stacks right for frequent app releases?No — use standard Bicep incremental deployments
When should I use Deployment Stacks?For long-lived platform infrastructure needing lifecycle protection
How do I get predictable change planning?Bicep What-If + scoped deployments + modular templates
Bicep or Terraform?Bicep for Azure-centric; Terraform for multi-cloud

🚀 Quick Start

Deploy Platform Infrastructure (Stack)

az stack sub create \
--name "platform-stack-prod" \
--location "westeurope" \
--template-file "./infra/platform/main.bicep" \
--parameters "./infra/platform/parameters/prod.bicepparam" \
--deployment-resource-group "rg-platform-prod" \
--action-on-unmanage deleteResources \
--deny-settings-mode denyDelete

Deploy Application Resources (Standard)

# Preview changes
az deployment group what-if \
--resource-group "rg-app-prod" \
--template-file "./infra/application/main.bicep" \
--parameters "./infra/application/parameters/prod.bicepparam"

# Deploy
az deployment group create \
--resource-group "rg-app-prod" \
--template-file "./infra/application/main.bicep" \
--parameters "./infra/application/parameters/prod.bicepparam" \
--mode Incremental

📚 Microsoft Official Documentation References

TopicOfficial URL
Deployment Stackshttps://learn.microsoft.com/azure/azure-resource-manager/bicep/deployment-stacks
Bicep What-Ifhttps://learn.microsoft.com/azure/azure-resource-manager/bicep/deploy-what-if
Deployment Modeshttps://learn.microsoft.com/azure/azure-resource-manager/templates/deployment-modes
Azure Verified Moduleshttps://aka.ms/avm
IaC Best Practices (CAF)https://learn.microsoft.com/azure/cloud-adoption-framework/ready/considerations/infrastructure-as-code
Terraform vs Bicephttps://learn.microsoft.com/azure/developer/terraform/comparing-terraform-and-bicep
📖Learn