Azure Cosmos DB Account with Web App

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check Bicep Version Deploy To Azure Deploy To Azure US Gov Visualize

In this example, the template deploys an Azure Cosmos DB account, an App Service Plan, and creates a Web App in the App Service Plan. It also adds two Application settings to the Web App that reference the Azure Cosmos DB account endpoint. This way solutions deployed to the Web App can connect to the Azure Cosmos DB account endpoint using those settings.


This doesn't create an Azure Cosmos DB database, just the account where the database(s) go. You can create the database from the Web App code for example as per the samples.

Tags: Microsoft.DocumentDB/databaseAccounts, Microsoft.Web/serverfarms, Microsoft.Web/sites, SystemAssigned