Reputation: 165
I am trying to create an Azure Function App which is an EventHub Trigger
. The thing is that to connect to Azure Eventhub, I don't have the full connection string. Instead I have the Eventhub SAS token stored as secret
in a Key Vault.
I would like to know if in the App Settings
section there is a way to build the connection string by passing that token that I get from the key vault.
I have a variable KEYVAULT_SAS_SECRET
whose value I want to use in another variable within the App Setting.
Would it be possible to reference the KEYVAULT_SAS_SECRET
variable to construct the connection string that is stored in a second variable?
Something like this:
Endpoint=sb://some-namespace.servicebus.windows.net/;SharedAccessKeyName=policy;SharedAccessKey=[KEYVAULT_SAS_SECRET];EntityPath=eventhub-topic
.
Thank you very much in advance
Upvotes: 0
Views: 557
Reputation: 2522
Unfortunately it is not possible to reference Azure Function App Settings
variable in another App Settings
variables.
In your particular case you have to construct EventHub connection string from two App Settings
variables directly in your code
Upvotes: 1