Setting the file. One moment.
Chapter 10 · Azure Cloud Migrate
Subchapter 10.22
references/services/functions/global-rules.mdMarkdown3 KBView on GitHub
These rules apply to ALL phases of the migration skill.
⛔ NEVER perform destructive actions without explicit user confirmation via ask_user:
Always use ask_user before:
mcp_azure_mcp_get_azure_bestpractices tool before generating Azure codeinput.storageBlob(), output.storageBlob(), app.storageQueue(), etc. instead of BlobServiceClient, QueueClient, or other SDK clients. Only use SDK when no binding exists for the serviceEnterprise subscriptions commonly enforce policies that block local auth. Always design for identity-based access from the start.
allowSharedKeyAccess: false. Use identity-based connections with AzureWebJobsStorage__credential, __clientId, and service-specific URIs (__blobServiceUri, __queueServiceUri, etc.)disableLocalAuth: true. Use UAMI + RBAC role (e.g., Cognitive Services User) instead of API keysdisableLocalAuth: true. Use APPLICATIONINSIGHTS_AUTHENTICATION_STRING with ClientId=<uamiClientId>;Authorization=AADmanagedIdentityClientId explicitly:
const credential = new DefaultAzureCredential({
managedIdentityClientId: process.env.AZURE_CLIENT_ID
});DefaultAzureCredential tries SystemAssigned first and fails. Add AZURE_CLIENT_ID as an app setting mapped to the UAMI client ID.alwaysReady: [{ name: "blob", instanceCount: 1 }] to bootstrap the trigger listener. Without it, the trigger group never starts and Event Grid subscriptions are never auto-created (chicken-and-egg problem)AzureWebJobsStorage__queueServiceUri even when using blob trigger (not queue trigger)listKeys() to resolve the blobs_extension system key at deployment timeazd init --template refuses non-empty directories. Use temp directory approach: init in temp, copy template infrastructure files back