Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Assess and migrate workloads from AWS, GCP, or other clouds to Azure services.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/services/app-service/global-rules.md
1# Global Rules23These rules apply to ALL phases of App Service migration.45## Destructive Action Policy67⛔ **NEVER** perform destructive actions without explicit user confirmation via `ask_user`:8- Deleting files or directories9- Overwriting existing code10- Deploying to production environments11- Modifying existing Azure resources12- Removing source-platform resources1314## User Confirmation Required1516Always use `ask_user` before:17- Selecting Azure subscription18- Selecting Azure region/location19- Deploying infrastructure20- Making breaking changes to existing code21- Choosing App Service Plan tier (Free, Basic, Standard, Premium)2223## Best Practices2425- Always use `mcp_azure_mcp_get_azure_bestpractices` tool before generating Azure code26- Prefer managed identity over connection strings or API keys27- **Always use the latest supported runtime stack** — see the App Service [language overview](https://learn.microsoft.com/azure/app-service/overview-supported-languages) for the supported stacks page per language28- Follow Azure naming conventions29- Use Premium v3 or Standard plans for production workloads30- Enable health checks and diagnostic logging from day one3132## Identity-First Authentication (Zero Secrets)3334> Enterprise subscriptions commonly enforce policies that block local auth. Always design for identity-based access from the start.3536- **Storage accounts**: Use identity-based connections with `DefaultAzureCredential`37- **Databases**: Use Microsoft Entra authentication for Azure SQL and PostgreSQL Flexible Server38- **Key Vault**: Use Key Vault references in App Settings (`@Microsoft.KeyVault(SecretUri=...)`)39- **Application Insights**: Configure ingestion via the connection string app setting (`APPLICATIONINSIGHTS_CONNECTION_STRING`). Use managed identity for management-plane access (querying, configuring components), not for telemetry ingestion40- **DefaultAzureCredential with UAMI**: Always pass `managedIdentityClientId` explicitly:41```javascript42const credential = new DefaultAzureCredential({43managedIdentityClientId: process.env.AZURE_CLIENT_ID44});45```4647## App Service Specifics4849- **Always enable HTTPS Only** — set `httpsOnly: true` in Bicep50- **Use 64-bit worker** for production — set `use32BitWorkerProcess: false`51- **Enable Always On** for Standard tier and above to prevent idle unload52- **Configure health check path** — `/healthz` or equivalent endpoint53- **Use deployment slots** for zero-downtime deployments in Standard tier+54- **Set minimum TLS to 1.2** — `minTlsVersion: '1.2'`55- **Enable managed identity** — prefer User Assigned for multi-resource scenarios56- **Use App Configuration** for shared settings across environments57- **Use Key Vault** for secrets — never store secrets in App Settings directly5859## Output Directory6061All migration output goes to `<source-folder>-azure/` at workspace root. Never modify the source directory.62