Multi-Environment Strategy
TL;DR — Use one ARM template with environment-specific parameter files. Promote from dev → staging → prod with the same security and compliance guarantees.
Environment Layout​
File Structure​
.azure/deployments/order-api/
├── template.json # Shared template
├── parameters.dev.json # Dev overrides
├── parameters.staging.json # Staging overrides
├── parameters.prod.json # Prod overrides
└── metadata.json
Parameter Differences​
| Parameter | Dev | Staging | Prod |
|---|---|---|---|
environment | dev | staging | prod |
skuName | Y1 (Consumption) | EP1 (Premium) | EP2 (Premium) |
minInstances | 0 | 1 | 3 |
maxInstances | 10 | 20 | 50 |
geoRedundancy | false | false | true |
Promotion Workflow​
- Dev — deploy freely, test features
- Staging — mirrors prod SKUs, integration tests
- Prod — requires PR approval + environment protection rules
GitHub environment protection rules enforce the gate:
| Environment | Required Reviewers | Branch Restriction |
|---|---|---|
azure-dev | None | Any branch |
azure-staging | 1 reviewer | main only |
azure-prod | 2 reviewers | main only |