← ClaudeAtlas

scaffolding-multi-tenant-azure-appslisted

Scaffolds a multi-tenant Azure app where each tenant gets its own resource group on a shared subscription, with one Bicep main.bicep driven by a single tenant parameter that cascades through every resource name. The default tenant keeps the original (single-tenant) names byte-identical so the pattern works for the first deployment with no migration. Use when onboarding the second tenant onto an app that started single-tenant, designing a multi-school/multi-clinic/multi-org SaaS, or refactoring shared resources to be per-tenant.
alexpizarro/azure-lean-stack-skills · ★ 1 · DevOps & Infrastructure · score 74
Install: claude install-skill alexpizarro/azure-lean-stack-skills
# Scaffolding Multi-Tenant Azure Apps Multi-tenant pattern with **one resource group per tenant on a shared subscription**. One `tenant` parameter drives the RG and every resource name. Adding a tenant = redeploy with a new param value. ## When to use this pattern | Need | This skill | |------|-----------| | One product, multiple isolated customers (schools, clinics, agencies) | Yes | | Per-tenant DB, per-tenant storage, per-tenant ACA | Yes | | Multi-tenant SaaS where customers share a single DB | No — that's row-level multi-tenancy, not infra-level | | Different products for different customers | No — use per-product subscriptions instead | ## Workflow checklist Copy this checklist and tick items off: ``` Onboarding a new tenant: - [ ] Step 1: Agree on the tenant slug (kebab-case, ≤20 chars, no Azure reserved words) - [ ] Step 2: Verify the derived storage account name fits (≤24 chars, alphanumeric) — provide override if not - [ ] Step 3: Copy infra/environments/prod.parameters.json → infra/environments/{tenant}.parameters.json - [ ] Step 4: Edit tenant slug + storageAccountName override if needed - [ ] Step 5: Create a new branch for this tenant if using branch-per-tenant (recommended for full isolation) - [ ] Step 6: Add OIDC SP + federated credential bound to the new branch (skill: configuring-azure-oidc-for-github-actions) - [ ] Step 7: Generate per-tenant SQL password + add as GitHub secret - [ ] Step 8: Push to the tenant branch → workflow provisions the isolate