I am following some tutorial to connect Azure Function to Cosmosdb like this (the tutorial is for a V3 in-process azure function)
[CosmosDBTrigger(databaseName: "Test",
collectionName: "collection1",
ConnectionStringSetting = "ConnectionString",
LeaseCollectionName = "lease",
LeaseCollectionPrefix = "UpdateLocation-",
CreateLeaseCollectionIfNotExists = true)]
However, with my Azure Function V4 dotnet Isolated - I have similar settings but I keep getting this error
Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.UpdateCustomerVoucherList'. Microsoft.Azure.WebJobs.Extensions.CosmosDB: Cannot create Collection Information for Vouchers in database Vouchers with lease leases in database Vouchers : Unable to resolve app setting for property 'CosmosDBTriggerAttribute.ConnectionStringSetting'. Make sure the app setting exists and has a valid value. Microsoft.Azure.WebJobs.Extensions.CosmosDB: Unable to resolve app setting for property 'CosmosDBTriggerAttribute.ConnectionStringSetting'. Make sure the app setting exists and has a valid value.
I have the ConnectionString app settings in the local.settings.json and it is being used by my other http trigger function happily to insert/update the entity.
"ConnectionString": "AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5...."
Any ideas what else I need to do the connect dotnet isolated V4 azure function to cosmos change feed to listen to the updates.
TIA