Azure Defaults Skill
Single source of truth for all Azure infrastructure configuration used across agents.
Replaces individual _shared/ file lookups with one consolidated reference.
Quick Reference (Load First)
Default Regions
| Service |
Default Region |
Reason |
| All resources |
swedencentral |
EU GDPR-compliant |
| Static Web Apps |
westeurope |
Not available in swedencentral |
| Azure OpenAI |
swedencentral |
Limited availability — verify first |
| Failover |
germanywestcentral |
EU paired alternative |
Required Tags (Azure Policy Enforced)
| Tag |
Required |
Example Values |
Environment |
Yes |
dev, staging, prod |
ManagedBy |
Yes |
Bicep |
Project |
Yes |
Project identifier |
Owner |
Yes |
Team or individual name |
Bicep pattern:
tags: {
Environment: environment
ManagedBy: 'Bicep'
Project: projectName
Owner: owner
}
Unique Suffix Pattern
Generate ONCE in main.bicep, pass to ALL modules:
// main.bicep
var uniqueSuffix = uniqueString(resourceGroup().id)
module keyVault 'modules/key-vault.bicep' = {
params: { uniqueSuffix: uniqueSuffix }
}
Security Baseline
| Setting |
Value |
Applies To |
supportsHttpsTrafficOnly |
true |
Storage accounts |
minimumTlsVersion |
'TLS1_2' |
All services |
allowBlobPublicAccess |
false |
Storage accounts |
publicNetworkAccess |
'Disabled' (prod) |
Data services |
| Authentication |
Managed Identity |
Prefer over keys/strings |
| SQL Auth |
Azure AD-only |
azureADOnlyAuthentication: true |
CAF Naming Conventions
Standard Abbreviations
| Resource |
Abbreviation |
Name Pattern |
Max Length |
| Resource Group |
rg |
rg-{project}-{env} |
90 |
| Virtual Network |
vnet |
vnet-{project}-{env} |
64 |
| Subnet |
snet |
snet-{purpose}-{env} |
80 |
| NSG |
nsg |
nsg-{purpose}-{env} |
80 |
| Key Vault |
kv |
kv-{short}-{env}-{suffix} |
24 |
| Storage Account |
st |
st{short}{env}{suffix} |
24 |
| App Service Plan |
asp |
asp-{project}-{env} |
40 |
| App Service |
app |
app-{project}-{env} |
60 |
| SQL Server |
sql |
sql-{project}-{env} |
63 |
| SQL Database |
sqldb |
sqldb-{project}-{env} |
128 |
| Static Web App |
stapp |
stapp-{project}-{env} |
40 |
| CDN / Front Door |
fd |
fd-{project}-{env} |
64 |
| Log Analytics |
log |
log-{project}-{env} |
63 |
| App Insights |
appi |
appi-{project}-{env} |
255 |
| Container App |
ca |
ca-{project}-{env} |
32 |
| Container Env |
cae |
cae-{project}-{env} |
60 |
| Cosmos DB |
cosmos |
cosmos-{project}-{env} |
44 |
| Service Bus |
sb |
sb-{project}-{env} |
50 |
Length-Constrained Resources
Key Vault and Storage Account have 24-char limits. Always include uniqueSuffix:
// Key Vault: kv-{8chars}-{3chars}-{6chars} = 21 chars max
var kvName = 'kv-${take(projectName, 8)}-${take(environment, 3)}-${take(uniqueSuffix, 6)}'
// Storage: st{8chars}{3chars}{6chars} = 19 chars max (no hyphens!)
var stName = 'st${take(replace(projectName, '-', ''), 8)}${take(environment, 3)}${take(uniqueSuffix, 6)}'
Naming Rules
- DO: Use lowercase with hyphens (
kv-myapp-dev-abc123)
- DO: Include
uniqueSuffix in globally unique names (Key Vault, Storage, SQL Server)
- DO: Use
take() to truncate long names within limits
- DON'T: Use hyphens in Storage Account names (only lowercase + numbers)
- DON'T: Hardcode unique values — always derive from
uniqueString(resourceGroup().id)
- DON'T: Exceed max length — Bicep won't warn, deployment will fail
Azure Verified Modules (AVM)
AVM-First Policy
- ALWAYS check AVM availability first via
mcp_bicep_list_avm_metadata
- Use AVM module defaults for SKUs when available
- If custom SKU needed, require live deprecation research
- NEVER hardcode SKUs without validation
- NEVER write raw Bicep for a resource that has an AVM module
Common AVM Modules
| Resource |
Module Path |
Min Version |
| Key Vault |
br/public:avm/res/key-vault/vault |
0.11.0 |
| Virtual Network |
br/public:avm/res/network/virtual-network |
0.5.0 |
| Storage Account |
br/public:avm/res/storage/storage-account |
0.14.0 |
| App Service Plan |
br/public:avm/res/web/serverfarm |
0.4.0 |
| App Service |
br/public:avm/res/web/site |
0.12.0 |
| SQL Server |
br/public:avm/res/sql/server |
0.10.0 |
| Log Analytics |
br/public:avm/res/operational-insights/workspace |
0.9.0 |
| App Insights |
br/public:avm/res/insights/component |
0.4.0 |
| NSG |
br/public:avm/res/network/network-security-group |
0.5.0 |
| Static Web App |
br/public:avm/res/web/static-site |
0.4.0 |
| Container App |
br/public:avm/res/app/container-app |
0.11.0 |
| Container Env |
br/public:avm/res/app/managed-environment |
0.8.0 |
| Cosmos DB |
br/public:avm/res/document-db/database-account |
0.10.0 |
| Front Door |
br/public:avm/res/cdn/profile |
0.7.0 |
| Service Bus |
br/public:avm/res/service-bus/namespace |
0.10.0 |
| Container Registry |
br/public:avm/res/container-registry/registry |
0.6.0 |
Finding Latest AVM Version
// Use Bicep MCP tool:
mcp_bicep_list_avm_metadata → filter by resource type → use latest version
// Or check: https://aka.ms/avm/index
AVM Usage Pattern
module keyVault 'br/public:avm/res/key-vault/vault:0.11.0' = {
name: '${kvName}-deploy'
params: {
name: kvName
location: location
tags: tags
enableRbacAuthorization: true
enablePurgeProtection: true
}
}
AVM Known Pitfalls
Region Limitations
| Service |
Limitation |
Workaround |
| Static Web Apps |
Only 5 regions: westus2, centralus, eastus2, westeurope, eastasia |
Use westeurope for EU |
| Azure OpenAI |
Limited regions per model |
Check availability before planning |
| Container Apps |
Most regions but not all |
Verify cae environment in target region |
Parameter Type Mismatches
Known issues when using AVM modules — verify before coding:
Log Analytics Workspace (operational-insights/workspace):
dailyQuotaGb is int in AVM, not string
- DO:
dailyQuotaGb: 5
- DON'T:
dailyQuotaGb: '5'
Container Apps Managed Environment (app/managed-environment):
appLogsConfiguration deprecated in newer versions
- DO: Use
logsConfiguration with destination object
- DON'T: Use
appLogsConfiguration.destination: 'log-analytics'
Container Apps (app/container-app):
scaleSettings is an object, not array of rules
- DO: Check AVM schema for exact object shape
- DON'T: Assume
scaleRules: [...] array format
SQL Server (sql/server):
sku parameter is a typed object {name, tier, capacity}
- DO: Pass full SKU object matching schema
- DON'T: Pass just string
'S0'
availabilityZone requires specific format per region
App Service (web/site):
APPINSIGHTS_INSTRUMENTATIONKEY deprecated
- DO: Use
APPLICATIONINSIGHTS_CONNECTION_STRING instead
- DON'T: Set instrumentation key directly
Key Vault (key-vault/vault):
softDeleteRetentionInDays is immutable after creation
- DO: Set correctly on first deploy (default: 90)
- DON'T: Try to change after vault exists
Static Web App (web/static-site):
- Free SKU may not be deployable via ARM in all regions
- DO: Use
Standard SKU for reliable ARM deployment
- DON'T: Assume Free tier works everywhere via Bicep
WAF Assessment Criteria
Scoring Scale
| Score |
Definition |
| 9-10 |
Exceeds best practices, production-ready |
| 7-8 |
Meets best practices with minor gaps |
| 5-6 |
Adequate but improvements needed |
| 3-4 |
Significant gaps, address before production |
| 1-2 |
Critical deficiencies, not production-ready |
Pillar Definitions
| Pillar |
Icon |
Focus Areas |
| Security |
🔒 |
Identity, network, data protection, threat detection |
| Reliability |
🔄 |
SLA, redundancy, disaster recovery, health monitoring |
| Performance |
⚡ |
Response time, scalability, caching, load testing |
| Cost |
💰 |
Right-sizing, reserved instances, monitoring spend |
| Operations |
🔧 |
IaC, CI/CD, monitoring, incident response, documentation |
Assessment Rules
- DO: Score each pillar 1-10 with confidence level (High/Medium/Low)
- DO: Identify specific gaps with remediation recommendations
- DO: Calculate composite WAF score as average of all pillars
- DON'T: Give perfect 10/10 scores without exceptional justification
- DON'T: Skip any pillar even if requirements seem light
- DON'T: Provide generic recommendations — be specific to the workload
Azure Pricing MCP Service Names
Exact names for the Azure Pricing MCP tool. Using wrong names returns 0 results.
| Azure Service |
Correct service_name |
Common SKUs |
| SQL Database |
SQL Database |
Basic, Standard, S0, S1, Premium |
| App Service |
Azure App Service |
B1, S1, P1v3, P1v4 |
| Container Apps |
Azure Container Apps |
Consumption |
| Service Bus |
Service Bus |
Basic, Standard, Premium |
| Key Vault |
Key Vault |
Standard |
| Storage |
Storage |
Standard, Premium, LRS, GRS |
| Virtual Machines |
Virtual Machines |
D4s_v5, B2s, E4s_v5 |
| Static Web Apps |
Azure Static Web Apps |
Free, Standard |
| Cosmos DB |
Azure Cosmos DB |
Serverless, Provisioned |
| Front Door |
Azure Front Door |
Standard, Premium |
- DO: Use exact names from the table above
- DON'T: Use "Azure SQL" (returns 0 results) — use "SQL Database"
- DON'T: Use "Web App" — use "Azure App Service"
Service Recommendation Matrix
Workload Patterns
| Pattern |
Cost-Optimized Tier |
Balanced Tier |
Enterprise Tier |
| Static Site |
SWA Free + Blob |
SWA Std + CDN + KV |
SWA Std + FD + KV + Monitor |
| API-First |
App Svc B1 + SQL Basic |
App Svc S1 + SQL S1 + KV |
App Svc P1v3 + SQL Premium + APIM |
| N-Tier Web |
App Svc B1 + SQL Basic |
App Svc S1 + SQL S1 + Redis + KV |
App Svc P1v4 + SQL Premium + Redis + FD |
| Serverless |
Functions Consumption |
Functions Premium + CosmosDB |
Functions Premium + CosmosDB + APIM |
| Container |
Container Apps Consumption |
Container Apps + ACR + KV |
AKS + ACR + KV + Monitor |
| Data Platform |
SQL Basic + Blob |
Synapse Serverless + ADLS |
Synapse Dedicated + ADLS + Purview |
Detection Signals
Map user language to workload pattern:
| User Says |
Likely Pattern |
| "website", "landing page", "blog" |
Static Site |
| "REST API", "microservices", "backend" |
API-First |
| "web app", "portal", "dashboard" |
N-Tier Web |
| "event-driven", "triggers", "webhooks" |
Serverless |
| "Docker", "Kubernetes", "containers" |
Container |
| "analytics", "data warehouse", "ETL" |
Data Platform |
Business Domain Signals
| Industry |
Common Compliance |
Default Security |
| Healthcare |
HIPAA |
Private endpoints, encryption at rest |
| Financial |
PCI-DSS, SOC 2 |
WAF, private endpoints, audit logging |
| Government |
FedRAMP, IL4/5 |
Azure Gov, private endpoints |
| Retail/E-commerce |
PCI-DSS |
WAF, DDoS protection |
| Education |
FERPA |
Data residency, access controls |
Company Size Heuristics
| Size |
Budget Signal |
Default Tier |
Security Posture |
| Startup (<50) |
"$50-200/mo" |
Cost-Optimized |
Basic managed identity |
| Mid-Market (50-500) |
"$500-2000/mo" |
Balanced |
Private endpoints, KV |
| Enterprise (500+) |
"$2000+/mo" |
Enterprise |
Full WAF compliance |
Industry Compliance Pre-Selection
| Industry |
Auto-Select |
| Healthcare |
HIPAA checkbox, private endpoints |
| Finance |
PCI-DSS + SOC 2, WAF required |
| Government |
Data residency, enhanced audit |
| Retail |
PCI-DSS if payments, DDoS |
Governance Discovery
Azure Policy Discovery Workflow
Before creating implementation plans, discover active policies:
1. Query Azure Resource Graph for policy assignments
2. Check tag enforcement policies
3. Check allowed resource types
4. Check allowed locations
5. Document in 04-governance-constraints.md
ARG Query Pattern
PolicyResources
| where type == 'microsoft.authorization/policyassignments'
| where properties.enforcementMode == 'Default'
| project name, displayName=properties.displayName,
effect=properties.parameters.effect.value,
scope=properties.scope
| order by name asc
Common Policy Constraints
| Policy |
Impact |
Solution |
| Required tags |
Deployment fails without tags |
Include all 4 required tags |
| Allowed locations |
Resources rejected outside list |
Use swedencentral default |
| SQL AAD-only auth |
SQL password auth blocked |
Use azureADOnlyAuthentication: true |
| Storage shared key |
Shared key access denied |
Use managed identity RBAC |
| Zone redundancy |
Non-zonal SKUs rejected |
Use P1v4+ for App Service Plans |
Research Workflow (All Agents)
Standard 4-Step Pattern
- Validate Prerequisites — Confirm previous artifact exists. If missing, STOP.
- Read Agent Context — Read previous artifact for context. Read template for H2 structure.
- Domain-Specific Research — Query ONLY for NEW information not in artifacts.
- Confidence Gate (80% Rule) — Proceed at 80%+ confidence. Below 80%, ASK user.
Confidence Levels
| Level |
Indicators |
Action |
| High (80-100%) |
All critical info available |
Proceed |
| Medium (60-79%) |
Some assumptions needed |
Document assumptions, ask for critical gaps |
| Low (0-59%) |
Major gaps |
STOP — request clarification |
Context Reuse Rules
- DO: Read previous agent's artifact for context
- DO: Cache shared defaults (read once per session)
- DO: Query external sources only for NEW information
- DON'T: Re-query Azure docs for resources already in artifacts
- DON'T: Search workspace repeatedly (context flows via artifacts)
- DON'T: Re-validate previous agent's work (trust artifact chain)
Agent-Specific Research Focus
| Agent |
Primary Research |
Skip (Already in Artifacts) |
| Requirements |
User needs, business context |
— |
| Architect |
WAF gaps, SKU comparisons, pricing |
Service list (from 01) |
| Bicep Plan |
AVM availability, governance policies |
Architecture decisions (from 02) |
| Bicep Code |
AVM schemas, parameter types |
Resource list (from 04) |
| Deploy |
Azure state (what-if), credentials |
Template structure (from 05) |
Service Lifecycle Validation
AVM Default Trust
When using AVM modules with default SKU parameters:
- Trust the AVM default — Microsoft maintains these
- No additional deprecation research needed for defaults
- If overriding SKU parameter, run deprecation research
Deprecation Research (For Non-AVM or Custom SKUs)
| Source |
Query Pattern |
Reliability |
| Azure Updates |
azure.microsoft.com/updates/?query={service}+deprecated |
High |
| Microsoft Learn |
Check "Important" / "Note" callouts on service pages |
High |
| Azure CLI |
az provider show --namespace {provider} for API versions |
Medium |
| Resource Provider |
Check available SKUs in target region |
High |
Known Deprecation Patterns
| Pattern |
Status |
Replacement |
| "Classic" anything |
DEPRECATED |
ARM equivalents |
CDN Standard_Microsoft |
DEPRECATED 2027 |
Azure Front Door |
| App Gateway v1 |
DEPRECATED |
App Gateway v2 |
| "v1" suffix services |
Likely deprecated |
Check for v2 |
| Old API versions (2020-xx) |
Outdated |
Use latest stable API |
What-If Deprecation Signals
Deploy agent should scan what-if output for:
deprecated|sunset|end.of.life|no.longer.supported|classic.*not.*supported|retiring
If detected, STOP and report before deployment.
Template-First Output Rules
Mandatory Compliance
| Rule |
Requirement |
| Exact text |
Use template H2 text verbatim |
| Exact order |
Required H2s appear in template-defined order |
| Anchor rule |
Extra sections allowed only AFTER last required H2 |
| No omissions |
All template H2s must appear in output |
| Attribution |
Include > Generated by {agent} agent | {YYYY-MM-DD} |
Output Location
All agent outputs go to agent-output/{project}/:
| Step |
Output File |
Agent |
| 1 |
01-requirements.md |
Requirements |
| 2 |
02-architecture-assessment.md |
Architect |
| 3 |
03-des-*.{py,md} |
Design |
| 4 |
04-implementation-plan.md |
Bicep Plan |
| 4 |
04-governance-constraints.md |
Bicep Plan |
| 4 |
04-preflight-check.md |
Bicep Code (pre-flight) |
| 5 |
05-implementation-reference.md |
Bicep Code |
| 6 |
06-deployment-summary.md |
Deploy |
| 7 |
07-*.md (7 documents) |
azure-artifacts skill |
Header Format
# Step {N}: {Title} - {project-name}
> Generated by {agent} agent | {YYYY-MM-DD}
Validation Checklist
Before completing any agent task, verify:
1---2name: azure-defaults-53description: Azure infrastructure defaults, naming conventions, security baselines, AVM modules, WAF assessment criteria, governance discovery patterns, service lifecycle validation, research workflows, and region/tag/SKU configuration for all agents. **Triggers**: "Azure defaults", "naming conventions", "required tags", "AVM modules", "WAF assessment", "security baseline", "governance discovery", "research patterns", "service lifecycle", "region defaults", "pricing MCP", "CAF naming", "unique suffix"4license: MIT5---67# Azure Defaults Skill89Single source of truth for all Azure infrastructure configuration used across agents.10Replaces individual `_shared/` file lookups with one consolidated reference.1112---1314## Quick Reference (Load First)1516### Default Regions1718| Service | Default Region | Reason |19| --- | --- | --- |20| **All resources** | `swedencentral` | EU GDPR-compliant |21| **Static Web Apps** | `westeurope` | Not available in swedencentral |22| **Azure OpenAI** | `swedencentral` | Limited availability — verify first |23| **Failover** | `germanywestcentral` | EU paired alternative |2425### Required Tags (Azure Policy Enforced)2627| Tag | Required | Example Values |28| --- | --- | --- |29| `Environment` | Yes | `dev`, `staging`, `prod` |30| `ManagedBy` | Yes | `Bicep` |31| `Project` | Yes | Project identifier |32| `Owner` | Yes | Team or individual name |3334Bicep pattern:3536```bicep37tags: {38 Environment: environment39 ManagedBy: 'Bicep'40 Project: projectName41 Owner: owner42}43```4445### Unique Suffix Pattern4647Generate ONCE in `main.bicep`, pass to ALL modules:4849```bicep50// main.bicep51var uniqueSuffix = uniqueString(resourceGroup().id)5253module keyVault 'modules/key-vault.bicep' = {54 params: { uniqueSuffix: uniqueSuffix }55}56```5758### Security Baseline5960| Setting | Value | Applies To |61| --- | --- | --- |62| `supportsHttpsTrafficOnly` | `true` | Storage accounts |63| `minimumTlsVersion` | `'TLS1_2'` | All services |64| `allowBlobPublicAccess` | `false` | Storage accounts |65| `publicNetworkAccess` | `'Disabled'` (prod) | Data services |66| Authentication | Managed Identity | Prefer over keys/strings |67| SQL Auth | Azure AD-only | `azureADOnlyAuthentication: true` |6869---7071## CAF Naming Conventions7273### Standard Abbreviations7475| Resource | Abbreviation | Name Pattern | Max Length |76| --- | --- | --- | --- |77| Resource Group | `rg` | `rg-{project}-{env}` | 90 |78| Virtual Network | `vnet` | `vnet-{project}-{env}` | 64 |79| Subnet | `snet` | `snet-{purpose}-{env}` | 80 |80| NSG | `nsg` | `nsg-{purpose}-{env}` | 80 |81| Key Vault | `kv` | `kv-{short}-{env}-{suffix}` | **24** |82| Storage Account | `st` | `st{short}{env}{suffix}` | **24** |83| App Service Plan | `asp` | `asp-{project}-{env}` | 40 |84| App Service | `app` | `app-{project}-{env}` | 60 |85| SQL Server | `sql` | `sql-{project}-{env}` | 63 |86| SQL Database | `sqldb` | `sqldb-{project}-{env}` | 128 |87| Static Web App | `stapp` | `stapp-{project}-{env}` | 40 |88| CDN / Front Door | `fd` | `fd-{project}-{env}` | 64 |89| Log Analytics | `log` | `log-{project}-{env}` | 63 |90| App Insights | `appi` | `appi-{project}-{env}` | 255 |91| Container App | `ca` | `ca-{project}-{env}` | 32 |92| Container Env | `cae` | `cae-{project}-{env}` | 60 |93| Cosmos DB | `cosmos` | `cosmos-{project}-{env}` | 44 |94| Service Bus | `sb` | `sb-{project}-{env}` | 50 |9596### Length-Constrained Resources9798Key Vault and Storage Account have 24-char limits. Always include `uniqueSuffix`:99100```bicep101// Key Vault: kv-{8chars}-{3chars}-{6chars} = 21 chars max102var kvName = 'kv-${take(projectName, 8)}-${take(environment, 3)}-${take(uniqueSuffix, 6)}'103104// Storage: st{8chars}{3chars}{6chars} = 19 chars max (no hyphens!)105var stName = 'st${take(replace(projectName, '-', ''), 8)}${take(environment, 3)}${take(uniqueSuffix, 6)}'106```107108### Naming Rules109110- **DO**: Use lowercase with hyphens (`kv-myapp-dev-abc123`)111- **DO**: Include `uniqueSuffix` in globally unique names (Key Vault, Storage, SQL Server)112- **DO**: Use `take()` to truncate long names within limits113- **DON'T**: Use hyphens in Storage Account names (only lowercase + numbers)114- **DON'T**: Hardcode unique values — always derive from `uniqueString(resourceGroup().id)`115- **DON'T**: Exceed max length — Bicep won't warn, deployment will fail116117---118119## Azure Verified Modules (AVM)120121### AVM-First Policy1221231. **ALWAYS** check AVM availability first via `mcp_bicep_list_avm_metadata`1242. Use AVM module defaults for SKUs when available1253. If custom SKU needed, require live deprecation research1264. **NEVER** hardcode SKUs without validation1275. **NEVER** write raw Bicep for a resource that has an AVM module128129### Common AVM Modules130131| Resource | Module Path | Min Version |132| --- | --- | --- |133| Key Vault | `br/public:avm/res/key-vault/vault` | `0.11.0` |134| Virtual Network | `br/public:avm/res/network/virtual-network` | `0.5.0` |135| Storage Account | `br/public:avm/res/storage/storage-account` | `0.14.0` |136| App Service Plan | `br/public:avm/res/web/serverfarm` | `0.4.0` |137| App Service | `br/public:avm/res/web/site` | `0.12.0` |138| SQL Server | `br/public:avm/res/sql/server` | `0.10.0` |139| Log Analytics | `br/public:avm/res/operational-insights/workspace` | `0.9.0` |140| App Insights | `br/public:avm/res/insights/component` | `0.4.0` |141| NSG | `br/public:avm/res/network/network-security-group` | `0.5.0` |142| Static Web App | `br/public:avm/res/web/static-site` | `0.4.0` |143| Container App | `br/public:avm/res/app/container-app` | `0.11.0` |144| Container Env | `br/public:avm/res/app/managed-environment` | `0.8.0` |145| Cosmos DB | `br/public:avm/res/document-db/database-account` | `0.10.0` |146| Front Door | `br/public:avm/res/cdn/profile` | `0.7.0` |147| Service Bus | `br/public:avm/res/service-bus/namespace` | `0.10.0` |148| Container Registry | `br/public:avm/res/container-registry/registry` | `0.6.0` |149150### Finding Latest AVM Version151152```153// Use Bicep MCP tool:154mcp_bicep_list_avm_metadata → filter by resource type → use latest version155156// Or check: https://aka.ms/avm/index157```158159### AVM Usage Pattern160161```bicep162module keyVault 'br/public:avm/res/key-vault/vault:0.11.0' = {163 name: '${kvName}-deploy'164 params: {165 name: kvName166 location: location167 tags: tags168 enableRbacAuthorization: true169 enablePurgeProtection: true170 }171}172```173174---175176## AVM Known Pitfalls177178### Region Limitations179180| Service | Limitation | Workaround |181| --- | --- | --- |182| Static Web Apps | Only 5 regions: `westus2`, `centralus`, `eastus2`, `westeurope`, `eastasia` | Use `westeurope` for EU |183| Azure OpenAI | Limited regions per model | Check availability before planning |184| Container Apps | Most regions but not all | Verify `cae` environment in target region |185186### Parameter Type Mismatches187188Known issues when using AVM modules — verify before coding:189190**Log Analytics Workspace** (`operational-insights/workspace`):191- `dailyQuotaGb` is `int` in AVM, not `string`192- **DO**: `dailyQuotaGb: 5`193- **DON'T**: `dailyQuotaGb: '5'`194195**Container Apps Managed Environment** (`app/managed-environment`):196- `appLogsConfiguration` deprecated in newer versions197- **DO**: Use `logsConfiguration` with destination object198- **DON'T**: Use `appLogsConfiguration.destination: 'log-analytics'`199200**Container Apps** (`app/container-app`):201- `scaleSettings` is an object, not array of rules202- **DO**: Check AVM schema for exact object shape203- **DON'T**: Assume `scaleRules: [...]` array format204205**SQL Server** (`sql/server`):206- `sku` parameter is a typed object `{name, tier, capacity}`207- **DO**: Pass full SKU object matching schema208- **DON'T**: Pass just string `'S0'`209- `availabilityZone` requires specific format per region210211**App Service** (`web/site`):212- `APPINSIGHTS_INSTRUMENTATIONKEY` deprecated213- **DO**: Use `APPLICATIONINSIGHTS_CONNECTION_STRING` instead214- **DON'T**: Set instrumentation key directly215216**Key Vault** (`key-vault/vault`):217- `softDeleteRetentionInDays` is immutable after creation218- **DO**: Set correctly on first deploy (default: 90)219- **DON'T**: Try to change after vault exists220221**Static Web App** (`web/static-site`):222- Free SKU may not be deployable via ARM in all regions223- **DO**: Use `Standard` SKU for reliable ARM deployment224- **DON'T**: Assume Free tier works everywhere via Bicep225226---227228## WAF Assessment Criteria229230### Scoring Scale231232| Score | Definition |233| --- | --- |234| 9-10 | Exceeds best practices, production-ready |235| 7-8 | Meets best practices with minor gaps |236| 5-6 | Adequate but improvements needed |237| 3-4 | Significant gaps, address before production |238| 1-2 | Critical deficiencies, not production-ready |239240### Pillar Definitions241242| Pillar | Icon | Focus Areas |243| --- | --- | --- |244| Security | 🔒 | Identity, network, data protection, threat detection |245| Reliability | 🔄 | SLA, redundancy, disaster recovery, health monitoring |246| Performance | ⚡ | Response time, scalability, caching, load testing |247| Cost | 💰 | Right-sizing, reserved instances, monitoring spend |248| Operations | 🔧 | IaC, CI/CD, monitoring, incident response, documentation |249250### Assessment Rules251252- **DO**: Score each pillar 1-10 with confidence level (High/Medium/Low)253- **DO**: Identify specific gaps with remediation recommendations254- **DO**: Calculate composite WAF score as average of all pillars255- **DON'T**: Give perfect 10/10 scores without exceptional justification256- **DON'T**: Skip any pillar even if requirements seem light257- **DON'T**: Provide generic recommendations — be specific to the workload258259---260261## Azure Pricing MCP Service Names262263Exact names for the Azure Pricing MCP tool. Using wrong names returns 0 results.264265| Azure Service | Correct `service_name` | Common SKUs |266| --- | --- | --- |267| SQL Database | `SQL Database` | `Basic`, `Standard`, `S0`, `S1`, `Premium` |268| App Service | `Azure App Service` | `B1`, `S1`, `P1v3`, `P1v4` |269| Container Apps | `Azure Container Apps` | `Consumption` |270| Service Bus | `Service Bus` | `Basic`, `Standard`, `Premium` |271| Key Vault | `Key Vault` | `Standard` |272| Storage | `Storage` | `Standard`, `Premium`, `LRS`, `GRS` |273| Virtual Machines | `Virtual Machines` | `D4s_v5`, `B2s`, `E4s_v5` |274| Static Web Apps | `Azure Static Web Apps` | `Free`, `Standard` |275| Cosmos DB | `Azure Cosmos DB` | `Serverless`, `Provisioned` |276| Front Door | `Azure Front Door` | `Standard`, `Premium` |277278- **DO**: Use exact names from the table above279- **DON'T**: Use "Azure SQL" (returns 0 results) — use "SQL Database"280- **DON'T**: Use "Web App" — use "Azure App Service"281282---283284## Service Recommendation Matrix285286### Workload Patterns287288| Pattern | Cost-Optimized Tier | Balanced Tier | Enterprise Tier |289| --- | --- | --- | --- |290| **Static Site** | SWA Free + Blob | SWA Std + CDN + KV | SWA Std + FD + KV + Monitor |291| **API-First** | App Svc B1 + SQL Basic | App Svc S1 + SQL S1 + KV | App Svc P1v3 + SQL Premium + APIM |292| **N-Tier Web** | App Svc B1 + SQL Basic | App Svc S1 + SQL S1 + Redis + KV | App Svc P1v4 + SQL Premium + Redis + FD |293| **Serverless** | Functions Consumption | Functions Premium + CosmosDB | Functions Premium + CosmosDB + APIM |294| **Container** | Container Apps Consumption | Container Apps + ACR + KV | AKS + ACR + KV + Monitor |295| **Data Platform** | SQL Basic + Blob | Synapse Serverless + ADLS | Synapse Dedicated + ADLS + Purview |296297### Detection Signals298299Map user language to workload pattern:300301| User Says | Likely Pattern |302| --- | --- |303| "website", "landing page", "blog" | Static Site |304| "REST API", "microservices", "backend" | API-First |305| "web app", "portal", "dashboard" | N-Tier Web |306| "event-driven", "triggers", "webhooks" | Serverless |307| "Docker", "Kubernetes", "containers" | Container |308| "analytics", "data warehouse", "ETL" | Data Platform |309310### Business Domain Signals311312| Industry | Common Compliance | Default Security |313| --- | --- | --- |314| Healthcare | HIPAA | Private endpoints, encryption at rest |315| Financial | PCI-DSS, SOC 2 | WAF, private endpoints, audit logging |316| Government | FedRAMP, IL4/5 | Azure Gov, private endpoints |317| Retail/E-commerce | PCI-DSS | WAF, DDoS protection |318| Education | FERPA | Data residency, access controls |319320### Company Size Heuristics321322| Size | Budget Signal | Default Tier | Security Posture |323| --- | --- | --- | --- |324| Startup (<50) | "$50-200/mo" | Cost-Optimized | Basic managed identity |325| Mid-Market (50-500) | "$500-2000/mo" | Balanced | Private endpoints, KV |326| Enterprise (500+) | "$2000+/mo" | Enterprise | Full WAF compliance |327328### Industry Compliance Pre-Selection329330| Industry | Auto-Select |331| --- | --- |332| Healthcare | HIPAA checkbox, private endpoints |333| Finance | PCI-DSS + SOC 2, WAF required |334| Government | Data residency, enhanced audit |335| Retail | PCI-DSS if payments, DDoS |336337---338339## Governance Discovery340341### Azure Policy Discovery Workflow342343Before creating implementation plans, discover active policies:344345```3461. Query Azure Resource Graph for policy assignments3472. Check tag enforcement policies3483. Check allowed resource types3494. Check allowed locations3505. Document in 04-governance-constraints.md351```352353### ARG Query Pattern354355```kusto356PolicyResources357| where type == 'microsoft.authorization/policyassignments'358| where properties.enforcementMode == 'Default'359| project name, displayName=properties.displayName,360 effect=properties.parameters.effect.value,361 scope=properties.scope362| order by name asc363```364365### Common Policy Constraints366367| Policy | Impact | Solution |368| --- | --- | --- |369| Required tags | Deployment fails without tags | Include all 4 required tags |370| Allowed locations | Resources rejected outside list | Use `swedencentral` default |371| SQL AAD-only auth | SQL password auth blocked | Use `azureADOnlyAuthentication: true` |372| Storage shared key | Shared key access denied | Use managed identity RBAC |373| Zone redundancy | Non-zonal SKUs rejected | Use P1v4+ for App Service Plans |374375---376377## Research Workflow (All Agents)378379### Standard 4-Step Pattern3803811. **Validate Prerequisites** — Confirm previous artifact exists. If missing, STOP.3822. **Read Agent Context** — Read previous artifact for context. Read template for H2 structure.3833. **Domain-Specific Research** — Query ONLY for NEW information not in artifacts.3844. **Confidence Gate (80% Rule)** — Proceed at 80%+ confidence. Below 80%, ASK user.385386### Confidence Levels387388| Level | Indicators | Action |389| --- | --- | --- |390| High (80-100%) | All critical info available | Proceed |391| Medium (60-79%) | Some assumptions needed | Document assumptions, ask for critical gaps |392| Low (0-59%) | Major gaps | STOP — request clarification |393394### Context Reuse Rules395396- **DO**: Read previous agent's artifact for context397- **DO**: Cache shared defaults (read once per session)398- **DO**: Query external sources only for NEW information399- **DON'T**: Re-query Azure docs for resources already in artifacts400- **DON'T**: Search workspace repeatedly (context flows via artifacts)401- **DON'T**: Re-validate previous agent's work (trust artifact chain)402403### Agent-Specific Research Focus404405| Agent | Primary Research | Skip (Already in Artifacts) |406| --- | --- | --- |407| Requirements | User needs, business context | — |408| Architect | WAF gaps, SKU comparisons, pricing | Service list (from 01) |409| Bicep Plan | AVM availability, governance policies | Architecture decisions (from 02) |410| Bicep Code | AVM schemas, parameter types | Resource list (from 04) |411| Deploy | Azure state (what-if), credentials | Template structure (from 05) |412413---414415## Service Lifecycle Validation416417### AVM Default Trust418419When using AVM modules with default SKU parameters:420- Trust the AVM default — Microsoft maintains these421- No additional deprecation research needed for defaults422- If overriding SKU parameter, run deprecation research423424### Deprecation Research (For Non-AVM or Custom SKUs)425426| Source | Query Pattern | Reliability |427| --- | --- | --- |428| Azure Updates | `azure.microsoft.com/updates/?query={service}+deprecated` | High |429| Microsoft Learn | Check "Important" / "Note" callouts on service pages | High |430| Azure CLI | `az provider show --namespace {provider}` for API versions | Medium |431| Resource Provider | Check available SKUs in target region | High |432433### Known Deprecation Patterns434435| Pattern | Status | Replacement |436| --- | --- | --- |437| "Classic" anything | DEPRECATED | ARM equivalents |438| CDN `Standard_Microsoft` | DEPRECATED 2027 | Azure Front Door |439| App Gateway v1 | DEPRECATED | App Gateway v2 |440| "v1" suffix services | Likely deprecated | Check for v2 |441| Old API versions (2020-xx) | Outdated | Use latest stable API |442443### What-If Deprecation Signals444445Deploy agent should scan what-if output for:446`deprecated|sunset|end.of.life|no.longer.supported|classic.*not.*supported|retiring`447448If detected, STOP and report before deployment.449450---451452## Template-First Output Rules453454### Mandatory Compliance455456| Rule | Requirement |457| --- | --- |458| Exact text | Use template H2 text verbatim |459| Exact order | Required H2s appear in template-defined order |460| Anchor rule | Extra sections allowed only AFTER last required H2 |461| No omissions | All template H2s must appear in output |462| Attribution | Include `> Generated by {agent} agent \| {YYYY-MM-DD}` |463464### Output Location465466All agent outputs go to `agent-output/{project}/`:467468| Step | Output File | Agent |469| --- | --- | --- |470| 1 | `01-requirements.md` | Requirements |471| 2 | `02-architecture-assessment.md` | Architect |472| 3 | `03-des-*.{py,md}` | Design |473| 4 | `04-implementation-plan.md` | Bicep Plan |474| 4 | `04-governance-constraints.md` | Bicep Plan |475| 4 | `04-preflight-check.md` | Bicep Code (pre-flight) |476| 5 | `05-implementation-reference.md` | Bicep Code |477| 6 | `06-deployment-summary.md` | Deploy |478| 7 | `07-*.md` (7 documents) | azure-artifacts skill |479480### Header Format481482```markdown483# Step {N}: {Title} - {project-name}484485> Generated by {agent} agent | {YYYY-MM-DD}486```487488---489490## Validation Checklist491492Before completing any agent task, verify:493494- [ ] Output file saved to `agent-output/{project}/`495- [ ] All required H2 headings from template are present496- [ ] H2 headings match template text exactly497- [ ] All 4 required tags included in resource definitions498- [ ] Unique suffix used for globally unique names499- [ ] Security baseline settings applied500- [ ] Region defaults correct (swedencentral, or exception documented)501- [ ] Attribution header included with agent name and date