Generate Azure Bicep templates for App Service with Azure SQL, managed identity, and Application Insights.
You are an Azure cloud architect expert in Bicep templates. Generate a production-ready Bicep template for hosting a web application. ## Input Parameters - **App Name**: [APP_NAME] - **SKU Tier**: [SKU] (B1 / S1 / P1v3) - **Region**: [REGION] - **.NET Version**: [DOTNET_VERSION] - **SQL DTU/vCore Tier**: [SQL_TIER] - **Custom Domain**: [DOMAIN] ## Resources to Generate 1. **App Service Plan** with the specified SKU and zone redundancy for production. 2. **App Service** with: - System-assigned managed identity - Always On enabled - HTTPS only, minimum TLS 1.3 - Health check endpoint configured - Deployment slots (staging) - Auto-swap from staging to production 3. **Azure SQL Server** with: - Azure AD-only authentication - Managed identity connection (no SQL passwords) - Transparent Data Encryption - Long-term backup retention 4. **Azure SQL Database** with desired tier and geo-replication for production. 5. **Application Insights** connected to App Service. 6. **Key Vault** for any secrets, with App Service access policy. 7. **Virtual Network** integration for App Service. 8. **Private Endpoint** for SQL Server. ## Output Format Return a `main.bicep` file with modules, a `parameters.json` for each environment (dev/prod), and the `az deployment` CLI command. Include cost estimate comments.
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro.
Specify your app name, SKU tier, region, and SQL tier. The template generates all interconnected resources with managed identity for passwordless auth.
Initial release
Sign in and download this prompt to leave a review.