agentsclimarketplace

Diagnosing azure deployment failures

Skill alexpizarro/azure-lean-stack-skills/skills/diagnosing-azure-deployment-failures

Azure apps that cost nothing when nobody's using them. A Claude Code skill pack — 14 composable skills, 37+ documented gotchas, branch-per-env CI/CD.

Install
npx -y skills add alexpizarro/azure-lean-stack-skills --skill diagnosing-azure-deployment-failures

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Matches Azure deploy / CI / runtime failures against 37+ documented gotchas with verified fixes (BCP258, AADSTS70021, sqlcmd-not-found, FC1-CLI-silent-fallback, ACS dataLocation quirks, SSE timeouts, and more). Delegates to Microsoft's azure-diagnostics for live log/metric queries. Use when a deploy fails, a deployed app misbehaves, or a CI step errors.

SKILL.md

7.1 KB, as published. Nobody here has run it

Diagnosing Azure Deployment Failures

Lookup-first triage against documented gotchas. If the symptom doesn't match a known entry, escalate to Microsoft's azure-diagnostics for live log/metric queries.

How to use this skill

  1. Get the failing symptom (error code, stack trace, observed behaviour)
  2. Match against the table below
  3. Apply the documented fix
  4. If no match, see references/gotchas.md for the full catalogue
  5. If still no match, capture a new gotcha via curating-azure-deployment-learnings

Quick symptom table

SymptomLikely causeFix
BCP258: sqlAdminPassword missingUsing .bicepparam instead of .parameters.jsonKeep params as .parameters.json; use @ prefix
LocationNotAvailableForResourceType for SWAaustraliaeast not supportedHard-code swaLocation = 'eastasia'
Multiple files found matching pattern *.sqlazure/sql-action accepts only one fileReplace with sqlcmd bash loop
sqlcmd: command not found (exit 127)Not pre-installed on ubuntu-24.04Install mssql-tools18 via Microsoft apt repo
gpg: cannot open /dev/ttygpg --dearmor without --batch in CIUse gpg --batch --yes --dearmor | sudo tee
OIDC fails AADSTS70021Federated credential subject mismatchMust match repo:owner/repo:ref:refs/heads/branch exactly
AZURE_CREDENTIALS auth fails silentlyWARNING: text prepended to SP JSONStrip with 2>/dev/null | python3 pipeline
Bicep runs on every push (slow)No change detectionAdd git diff check, conditional steps
error TS7016: no declaration for 'mssql'@types/mssql missingAdd "@types/mssql": "^9.1.5"
New function returns 404 after deployNot imported in api/src/index.tsAdd import './functions/{name}'
Functions return 500 on first requestSQL serverless auto-pausedWait 30–60s, retry
Placeholder strings cause cryptic errorsNon-empty placeholders fool if (!value)Use "" in example files
az functionapp create creates wrong planCLI silently falls back to Y1/DynamicUse ARM REST API or Bicep for FC1
az appservice plan create --sku FC1 failsCLI doesn't support FC1 reliablyUse ARM REST API
ARM PUT doesn't change hosting planCan't migrate existing appDelete and recreate
FUNCTIONS_WORKER_RUNTIME causes failureForbidden on FC1Remove from app settings
az functionapp cors add returns Bad RequestCLI CORS broken on FC1Use ARM REST API
"main": "dist/functions/*.js" doesn't workGlob not resolvedUse "main": "dist/index.js"
Missing package-lock.json breaks CIcache-dependency-path points to missing fileCommit lock file
Publish profile auth 401 on FC1Kudu auth different on FC1Use SP auth with azure/login@v2
Cold start 15-30s on ACALarge Docker imageUse Alpine, prune devDeps
SSE connections drop after 4 minDefault 240s request timeout--request-timeout 1800
az containerapp update has no effectUnchanged secret values skip restartaz containerapp revision restart
Secrets not available in appEnv var not linked--set-env-vars "VAR=secretref:secret-name"
Docker Hub image not pulledRate limit (100/6h anonymous)Authenticated pulls or move to GHCR/ACR
DeploymentModelNotSupported (Azure OpenAI)Model version not available in regionVerify: az cognitiveservices model list --location ...
EMAIL_FROM unknown before first deployAzure-managed domain hash auto-generatedRetrieve post-deploy with az communication email domain show
Email send crashes HTTP handlerpollUntilDone() throwsUse safeSend() wrapper
ACS resources fail with location errorMicrosoft.Communication/* requires location: 'global'Hardcode location: 'global'
ACS dataLocation failsUses plain English, not region IDsdataLocation: 'Australia'
ACS circular dependencylinkedDomains + dependsOn conflictDeclare order: emailService → domain → acs
403 on roleAssignmentsOIDC SP only has ContributorGrant User Access Administrator at RG scope
listSecrets output warningBicep linter flags secrets in outputs#disable-next-line outputs-should-not-contain-secrets
SWA self-referencing URL neededAPP_BASE_URL unknown before first deployUse 'https://${swa.properties.defaultHostname}'
Can't test before Azure provisionedNo mock patternCheck if (!process.env.KEY) → return mock
local.settings.json placeholder stringsFake strings are truthyUse "" for all user-input values
SQL Serverless bill higher than expected; DB never pausesHealth endpoint or scheduler polls the DB, keeping it awake 24/7DB-free shallow health check; or switch to flat Basic tier (~$5/mo). See cost-guardrails Guardrail #11

For the full catalogue with explanations, see references/gotchas.md.

When to delegate to Microsoft's azure-diagnostics

This skill is a static catalogue — known failure modes with known fixes. For dynamic failures, delegate:

SymptomUse Microsoft's skill
"My deployed app returns 500 — what's in the logs?"azure-diagnostics + Azure MCP for live log queries
"Performance is slow — what's the bottleneck?"azure-diagnostics + appinsights-instrumentation
"What's running in my subscription right now?"azure-resource-lookup
"Why is this resource costing so much?"azure-cost

See composition-with-azure-diagnostics.md.

General rules

  1. Template + architecture must stay in sync — when behaviour changes, update the templates in the same commit.
  2. Always add @types/* for packages that don't bundle their own .d.ts files.
  3. GPG in CI always needs --batch --yes and pipe through sudo tee.
  4. Verify Azure OpenAI / Cognitive model versions per region before writing Bicep.
  5. Every new SWA function must be imported in index.ts — compilation and deployment alone are insufficient.
  6. ACS resources are always location: 'global' regardless of where the RG is.
  7. Email failures should log, not crash — use safeSend() wrapper.
  8. Conditional Bicep saves 3–5 min per code-only deploy.

Composes with

  • curating-azure-deployment-learnings — capture new gotchas as you find them
  • Microsoft's azure-diagnostics — live log/metric queries
  • Microsoft's appinsights-instrumentation — adding telemetry to a running app
  • Microsoft's azure-resource-lookup — "what's actually deployed"

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.