@Jason Taylor Can you please confirm if your DB_URI has
https:// as this could cause the error : No connection adapters were found for <DB_URI>
Can't connect to cosmosdb from function when I deploy to Azure but it works locally
I have a function deployed in a functionapp that accesses a cosmosdb to write some data. My function works locally but when I deploy to Azure I keep getting an error that states:
No connection adapters were found for <DB_URI>
I'm using python and am creating the CosmosClient using the DB_URI and the Account_Primary_Key which I'm fetching from a key vault.
For some reason it works when I run locally passing the same parameters through env variables via local.settings.json but throws this error when pushed to the cloud.
Anyone have any pointers? The FunctionApp has rights to read the key vault as well as db contributor role access. The error message isn't helping me find the root cause.