Thanks a lot, for the help. I actually followed below two references which helped in my scenario.
https://github.com/Azure/azure-functions-host/issues/6423
https://gist.github.com/paulbatum/c301e8ca07b2561db91030a1566383fa
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
public static void Run([QueueTrigger("myqueue-items",
Connection = "QueueStorage")]string myQueueItem, ILogger log)
Considering, the above sample code, I have placed the connection string "QueueStorage" in the Configuration setting in the portal. This configuration setting uses a key-vault to fetch the primary connection string from secrets.
Now the issue is, currently we are storing both primary and secondary connection strings in the key vault. I have created two variables in the Configuration setting to fetch primary and secondary connection strings respectively.
The feature which I need to add in my Azure function is in case there is some issue while fetching the primary connection string, I need to pull the secondary connection string.
Is there any way this could be handled in the Connection parameter w.r.t the above code, considering in the Connection parameter, I can place only one Configuration setting related variable?
Thanks a lot for the help here.
Thanks a lot, for the help. I actually followed below two references which helped in my scenario.
https://github.com/Azure/azure-functions-host/issues/6423
https://gist.github.com/paulbatum/c301e8ca07b2561db91030a1566383fa
@Bhakuni, Priyanka (CW) Unfortunately you cannot define two connection string to the same trigger. There is no out of box feature that can help with your scenario.
You need to write your custom logic and use REST API to update the properties.appSettings with the primary or secondary connection string for your configuration property that you are using in your code.
Note: Any changes to applications settings and connection strings will restart your application
If you don't want to use the connection string then you can refer to Using Managed Identity between Azure Functions and Azure Storage sample.