Azure Prepare
Prepare subscriptions, resource groups, identity, governance, and cost controls per the Cloud Adoption Framework.
Landing zone setup is foundational; all deployments depend on this layer.
Use This Skill When
- The user is starting a new Azure project or subscription
- Deployment keeps failing due to missing prerequisites (permissions, providers, quotas)
- The user asks for preflight checks, environment bootstrap, or landing zone design
- The user needs Azure Policy, tagging strategy, or access control baseline
Context: Landing Zone Maturity
Immature: Ad hoc resource creation, no policies, inconsistent naming, mixed environments
Developing: Basic resource groups, manual access control, some tagging
Managed: Landing zone deployed, policies enforced, RBAC standardized, centralized logging ← Target
Optimized: GitOps for infrastructure, automated drift detection, cost governance, full audit trail
Required Inputs
- Tenant and subscription: Tenant ID, subscription ID, billing account
- Environment scope: Single tenant or multi-tenant? Dev/test/prod separation?
- Region strategy: Primary and secondary regions, data residency constraints
- Naming convention: Org-env-workload-resource-seq (e.g.,
contoso-prod-web-vm-01)
- Networking model: Hub-spoke, vWAN, or flat? Private or public endpoints?
- Identity model: Entra ID only, on-premises sync, hybrid?
- Security baseline: Encryption, firewalls, NSGs, private link requirements
- Team structure: Who owns the platform? Who owns workloads?
- Cost targets: Monthly budget, chargeback model, reserved capacity?
Decision Tree
Is this the first Azure subscription for the organization?
├─ Yes → Deploy landing zone from template (Microsoft Foundational or Enterprise)
└─ No → Align with existing landing zone patterns
Do you have on-premises infrastructure?
├─ Yes → Enable ExpressRoute, Site-to-Site VPN, DNS forwarders
└─ No → Direct internet egress acceptable
How many teams will share this subscription?
├─ Single team → Simple RBAC, one resource group per environment
└─ Multiple teams → Multiple resource groups, centralized policy, shared services
Are there compliance or regulatory requirements?
├─ Yes → Deploy Azure Policy, enable Defender, configure audit logging
└─ No → Basic security baseline sufficient
Workflow
Phase 1: Landing Zone Foundation
Choose landing zone template:
- Foundational (Startups, small teams): VNet, NSG, basic RBAC
- Standard (Mid-market): Hub-spoke, centralized DNS, policy enforcement
- Enterprise (Large org): Management groups, policy cascade, full governance
Provision landing zone:
# Use Azure landing zone Bicep templates from Microsoft
az deployment tenant create \
--name alz-deployment \
--location eastus \
--template-uri https://raw.githubusercontent.com/Azure/landing-zones-accelerator/main/templates/
Validate foundational resources:
- Management groups created (root > platform > landing zones)
- Subscription placed in correct management group
- Policy definitions assigned at appropriate scope
Phase 2: Subscription Baseline
Provider registration:
# Enable required resource providers
az provider register --namespace Microsoft.Compute
az provider register --namespace Microsoft.Network
az provider register --namespace Microsoft.Storage
# (List depends on workload)
Create resource groups by lifecycle:
- Shared: Logging, monitoring, networking (long-lived)
- Dev/Test: Short-lived, high churn, lower security bar
- Production: Long-lived, strict change controls, backup/DR
Apply Azure Policy:
- Enforce tagging (owner, environment, cost-center)
- Enforce encryption (storage, databases)
- Prevent public IP creation (unless whitelisted)
- Require network security groups
Phase 3: Identity & Access
Define role structure:
- Subscription Owner (2-3 people, max): Rare, emergency escalation only
- Resource Group Owners (teams): Manage resources within group
- Workload Contributors (developers): Deploy, configure; no delete
- Readers (auditors, ops): View-only, troubleshooting
Configure managed identities:
- System-assigned for single-app identities (App Service, Functions, AKS pods)
- User-assigned for shared or multi-app identities
- Never use connection strings in app settings
Set up Key Vault:
az keyvault create --name "kv-${environment}-${org}" \
--resource-group $RG --enable-rbac-authorization
Phase 4: Networking
Plan IP address space:
- Hub VNet: 10.0.0.0/8 reserved for platform services
- Spoke VNets: Subdivided by workload/environment
- Document all subnets, gateways, and external routes
Deploy network infrastructure:
- Hub VNet with bastion host (secure RDP/SSH)
- Spoke VNets peered to hub
- Network Security Groups with default-deny ingress
- Azure Firewall (hub) or Network Virtual Appliance (NVA)
Configure DNS:
- Azure DNS zones for public DNS
- Private DNS zones for internal resolution (*.privatelink.database.windows.net)
- Conditional forwarders to on-premises DNS
Phase 5: Logging & Monitoring
Centralize diagnostics:
- All subscriptions → Central Log Analytics workspace
- All storage accounts → Central storage for archival
- All activity logs → Central audit trail
Configure alerts:
- Failed logins, privilege escalation, unused roles
- Resource deletion, policy violations
- Cost threshold breaches
Phase 6: Cost Governance
Set budgets:
- Subscription-level budget with notifications at 50%, 75%, 100%
- Resource group budgets for shared services
- Alert on anomalies
Reserved capacity (if production):
- Analyze 1-year usage
- Purchase 1-year or 3-year reservations for 20-35% discount
Cost allocation:
- Tag all resources with cost-center tag
- Use Cost Management + Billing to show chargeback per team
Output Contract
Landing Zone Summary
- Subscription ID, tenant ID, region(s)
- Chosen landing zone template and justification
- High-level network topology
Pre-Deployment Checklist
- Provider registration status
- Required role assignments (who needs what)
- API and resource type quota headroom
Setup Commands or IaC
- Bicep template or Terraform code to replicate landing zone
- Order of operations (dependency graph)
- Sample parameter files for different environments
Access & Governance Model
- Role hierarchy and assignment plan
- Policy definitions and exceptions
- Tagging strategy with mandatory tags
Network & Identity Baseline
- VNet design, subnets, routing
- Managed identity and Key Vault setup
- DNS configuration
Monitoring & Cost Plan
- Log Analytics workspace scope
- Budget and alerting thresholds
- Reserved capacity recommendation
Practical Examples
Example 1: Dev/Test Landing Zone
- Single VNet (10.1.0.0/16)
- Three subnets: app (10.1.1.0/24), data (10.1.2.0/24), mgmt (10.1.3.0/24)
- Minimal NSGs (allow internal, deny external)
- Shared Log Analytics (7-day retention)
- Budget alert at $500/month
Example 2: Production Landing Zone with Hub-Spoke
- Hub VNet (10.0.0.0/16): Firewall, Bastion, DNS forwarders
- Spoke VNet per workload: Web (10.1.0.0/16), Data (10.2.0.0/16), API (10.3.0.0/16)
- All spokes peered to hub
- Strict NSGs per spoke with specific ingress rules
- Centralized logging to shared workspace
- 30-day retention, archive to storage after 90 days
- Budget alerts at 50%, 75%, 100% thresholds
Guardrails
- Never skip tagging strategy; enforce with Azure Policy from day one.
- Do not hardcode secrets in IaC or templates; use Key Vault references.
- Avoid manual post-setup configuration; all infrastructure must be in IaC.
- Do not share subscriptions across business units unless governance is extreme.
- Ensure network segmentation by default; permit traffic explicitly.
- Test landing zone teardown before production; ensure cleanup works end-to-end.
- Keep environment names consistent: dev-, test-, prod-* naming enforced by policy.
1---2name: azure-prepare3description: Prepare Azure environments and prerequisites before deployment. Use this skill when users ask for readiness checks, environment setup, or preflight planning. Covers landing zones, networking, identity, governance, and cost controls per Cloud Adoption Framework.4---56# Azure Prepare78Prepare subscriptions, resource groups, identity, governance, and cost controls per the Cloud Adoption Framework.9Landing zone setup is foundational; all deployments depend on this layer.1011## Use This Skill When1213- The user is starting a new Azure project or subscription14- Deployment keeps failing due to missing prerequisites (permissions, providers, quotas)15- The user asks for preflight checks, environment bootstrap, or landing zone design16- The user needs Azure Policy, tagging strategy, or access control baseline1718## Context: Landing Zone Maturity1920**Immature**: Ad hoc resource creation, no policies, inconsistent naming, mixed environments 21**Developing**: Basic resource groups, manual access control, some tagging 22**Managed**: Landing zone deployed, policies enforced, RBAC standardized, centralized logging ← **Target** 23**Optimized**: GitOps for infrastructure, automated drift detection, cost governance, full audit trail2425## Required Inputs2627- **Tenant and subscription**: Tenant ID, subscription ID, billing account28- **Environment scope**: Single tenant or multi-tenant? Dev/test/prod separation?29- **Region strategy**: Primary and secondary regions, data residency constraints30- **Naming convention**: Org-env-workload-resource-seq (e.g., `contoso-prod-web-vm-01`)31- **Networking model**: Hub-spoke, vWAN, or flat? Private or public endpoints?32- **Identity model**: Entra ID only, on-premises sync, hybrid?33- **Security baseline**: Encryption, firewalls, NSGs, private link requirements34- **Team structure**: Who owns the platform? Who owns workloads?35- **Cost targets**: Monthly budget, chargeback model, reserved capacity?3637## Decision Tree3839```40Is this the first Azure subscription for the organization?41├─ Yes → Deploy landing zone from template (Microsoft Foundational or Enterprise)42└─ No → Align with existing landing zone patterns4344Do you have on-premises infrastructure?45├─ Yes → Enable ExpressRoute, Site-to-Site VPN, DNS forwarders46└─ No → Direct internet egress acceptable4748How many teams will share this subscription?49├─ Single team → Simple RBAC, one resource group per environment50└─ Multiple teams → Multiple resource groups, centralized policy, shared services5152Are there compliance or regulatory requirements?53├─ Yes → Deploy Azure Policy, enable Defender, configure audit logging54└─ No → Basic security baseline sufficient55```5657## Workflow5859### Phase 1: Landing Zone Foundation60611. **Choose landing zone template**:62 - **Foundational** (Startups, small teams): VNet, NSG, basic RBAC63 - **Standard** (Mid-market): Hub-spoke, centralized DNS, policy enforcement64 - **Enterprise** (Large org): Management groups, policy cascade, full governance65662. **Provision landing zone**:67 ```bash68 # Use Azure landing zone Bicep templates from Microsoft69 az deployment tenant create \70 --name alz-deployment \71 --location eastus \72 --template-uri https://raw.githubusercontent.com/Azure/landing-zones-accelerator/main/templates/73 ```74753. **Validate foundational resources**:76 - Management groups created (root > platform > landing zones)77 - Subscription placed in correct management group78 - Policy definitions assigned at appropriate scope7980### Phase 2: Subscription Baseline81821. **Provider registration**:83 ```bash84 # Enable required resource providers85 az provider register --namespace Microsoft.Compute86 az provider register --namespace Microsoft.Network87 az provider register --namespace Microsoft.Storage88 # (List depends on workload)89 ```90912. **Create resource groups by lifecycle**:92 - **Shared**: Logging, monitoring, networking (long-lived)93 - **Dev/Test**: Short-lived, high churn, lower security bar94 - **Production**: Long-lived, strict change controls, backup/DR95963. **Apply Azure Policy**:97 - Enforce tagging (owner, environment, cost-center)98 - Enforce encryption (storage, databases)99 - Prevent public IP creation (unless whitelisted)100 - Require network security groups101102### Phase 3: Identity & Access1031041. **Define role structure**:105 - **Subscription Owner** (2-3 people, max): Rare, emergency escalation only106 - **Resource Group Owners** (teams): Manage resources within group107 - **Workload Contributors** (developers): Deploy, configure; no delete108 - **Readers** (auditors, ops): View-only, troubleshooting1091102. **Configure managed identities**:111 - System-assigned for single-app identities (App Service, Functions, AKS pods)112 - User-assigned for shared or multi-app identities113 - Never use connection strings in app settings1141153. **Set up Key Vault**:116 ```bash117 az keyvault create --name "kv-${environment}-${org}" \118 --resource-group $RG --enable-rbac-authorization119 ```120121### Phase 4: Networking1221231. **Plan IP address space**:124 - Hub VNet: 10.0.0.0/8 reserved for platform services125 - Spoke VNets: Subdivided by workload/environment126 - Document all subnets, gateways, and external routes1271282. **Deploy network infrastructure**:129 - Hub VNet with bastion host (secure RDP/SSH)130 - Spoke VNets peered to hub131 - Network Security Groups with default-deny ingress132 - Azure Firewall (hub) or Network Virtual Appliance (NVA)1331343. **Configure DNS**:135 - Azure DNS zones for public DNS136 - Private DNS zones for internal resolution (*.privatelink.database.windows.net)137 - Conditional forwarders to on-premises DNS138139### Phase 5: Logging & Monitoring1401411. **Centralize diagnostics**:142 - All subscriptions → Central Log Analytics workspace143 - All storage accounts → Central storage for archival144 - All activity logs → Central audit trail1451462. **Configure alerts**:147 - Failed logins, privilege escalation, unused roles148 - Resource deletion, policy violations149 - Cost threshold breaches150151### Phase 6: Cost Governance1521531. **Set budgets**:154 - Subscription-level budget with notifications at 50%, 75%, 100%155 - Resource group budgets for shared services156 - Alert on anomalies1571582. **Reserved capacity** (if production):159 - Analyze 1-year usage160 - Purchase 1-year or 3-year reservations for 20-35% discount1611623. **Cost allocation**:163 - Tag all resources with cost-center tag164 - Use Cost Management + Billing to show chargeback per team165166## Output Contract1671681. **Landing Zone Summary**169 - Subscription ID, tenant ID, region(s)170 - Chosen landing zone template and justification171 - High-level network topology1721732. **Pre-Deployment Checklist**174 - Provider registration status175 - Required role assignments (who needs what)176 - API and resource type quota headroom1771783. **Setup Commands or IaC**179 - Bicep template or Terraform code to replicate landing zone180 - Order of operations (dependency graph)181 - Sample parameter files for different environments1821834. **Access & Governance Model**184 - Role hierarchy and assignment plan185 - Policy definitions and exceptions186 - Tagging strategy with mandatory tags1871885. **Network & Identity Baseline**189 - VNet design, subnets, routing190 - Managed identity and Key Vault setup191 - DNS configuration1921936. **Monitoring & Cost Plan**194 - Log Analytics workspace scope195 - Budget and alerting thresholds196 - Reserved capacity recommendation197198## Practical Examples199200### Example 1: Dev/Test Landing Zone201```202- Single VNet (10.1.0.0/16)203- Three subnets: app (10.1.1.0/24), data (10.1.2.0/24), mgmt (10.1.3.0/24)204- Minimal NSGs (allow internal, deny external)205- Shared Log Analytics (7-day retention)206- Budget alert at $500/month207```208209### Example 2: Production Landing Zone with Hub-Spoke210```211- Hub VNet (10.0.0.0/16): Firewall, Bastion, DNS forwarders212- Spoke VNet per workload: Web (10.1.0.0/16), Data (10.2.0.0/16), API (10.3.0.0/16)213- All spokes peered to hub214- Strict NSGs per spoke with specific ingress rules215- Centralized logging to shared workspace216- 30-day retention, archive to storage after 90 days217- Budget alerts at 50%, 75%, 100% thresholds218```219220## Guardrails221222- **Never skip tagging strategy**; enforce with Azure Policy from day one.223- **Do not hardcode secrets** in IaC or templates; use Key Vault references.224- **Avoid manual post-setup configuration**; all infrastructure must be in IaC.225- **Do not share subscriptions across business units** unless governance is extreme.226- **Ensure network segmentation** by default; permit traffic explicitly.227- **Test landing zone teardown before production**; ensure cleanup works end-to-end.228- **Keep environment names consistent**: dev-*, test-*, prod-* naming enforced by policy.