Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Prepare Azure environments for new workloads—subscriptions, networking, identity, and landing zones
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/services/static-web-apps/bicep.md
1# Static Web Apps - Bicep Patterns23## Basic Resource45```bicep6resource staticWebApp 'Microsoft.Web/staticSites@2022-09-01' = {7name: '${resourcePrefix}-${serviceName}-${uniqueHash}'8location: location9sku: {10name: 'Standard'11tier: 'Standard'12}13properties: {14buildProperties: {15appLocation: '/'16apiLocation: 'api'17outputLocation: 'dist'18}19}20}21```2223## Custom Domain2425```bicep26resource customDomain 'Microsoft.Web/staticSites/customDomains@2022-09-01' = {27parent: staticWebApp28name: 'www.example.com'29properties: {}30}31```3233## Application Settings3435For the integrated API:3637```bicep38resource staticWebAppSettings 'Microsoft.Web/staticSites/config@2022-09-01' = {39parent: staticWebApp40name: 'appsettings'41properties: {42DATABASE_URL: '@Microsoft.KeyVault(VaultName=${keyVault.name};SecretName=db-url)'43}44}45```4647## Deployment Token4849> ⚠️ **Security Warning:** Do NOT expose deployment tokens in Bicep outputs.5051See [deployment.md](deployment.md) for secure token handling.52