1
votes

I have a working azure function which puts a message on a service bus queue.

public static void Run(
        [TimerTrigger("0 * * * *")]TimerInfo myTimer,
        [ServiceBus("queueName", Connection = "ServiceBusConnection")] ICollector<Message> queue,
        TraceWriter log)
    {
        //function logic here
    }

The connection string is currently in the plain text in the app settings. Is it possible to have this encyrpted and still use the built in integration between azure functions and the service bus?

I have tried creating a ServiceBusAttribute at runtime but it doesn't look like you can pass it a connection string.

Any help is much appreciated

1
Best option is key vault medium.com/statuscode/…Dan Wilson

1 Answers

1
votes

This is currently not possible. There is a feature request to retrieve secrets used in bindings from KeyVault: https://github.com/Azure/azure-webjobs-sdk/issues/746

The GitHub issue also describes a workaround to retrieve the secrets from KeyVault at build time within VSTS.