title: Secure access to CosmosDB from App Service
body: <p>I have a node.js app deployed to Azure App Services which uses CosmosDB for storing the application data. Everything works fine.</p>
  
  <p>However, I would like to lock down access to the CosmosDB instance at the network level to secure the data better. </p>
  
  <p>Following the documentation, I have setup a virtual network, added the app service app into it, setup a service endpoint for CosmosDB and restricted access to the DB instance to only allow the virtual network. </p>
  
  <p>I have redone this multiple times, waited for everything to update (12-24 hours), but to no avail. I am consistently getting connection errors when the app attemps to call the DB once I implement the setup above.</p>
  
  <p>Does anyone have any insights? I am pretty frustrated and contemplating moving to AWS instead, but my client is keen to do Azure for a number of different reasons.</p>