Search code examples
azureazure-functionsazure-resource-managerazure-bicepazure-signalr

Azure function app's signalr_extension is not populated to use in signalR upstreams when creating a function app by Bicep


I created an Azure Function App by Bicep and tried to get the signalr_extension's value to use in the "upstream" configuration section of a serverless Azure SignalR Service. This is how I try to obtain this value in Bicep:

var signalRKey = listKeys(resourceId('Microsoft.Web/sites/host', funcAppName, 'default'), '2022-03-01').systemkeys.signalr_extension

This is how I configure the signalR service's upstream:

urlTemplate: 'https://${funcAppName}.azurewebsites.net/runtime/webhooks/signalr?code=${signalRKey}'

Running the bicep templates leads to the failure below:

Encountered an error (ServiceUnavailable) from host runtime.

When I remove the {signalRKey} from urlTemplate and replace it with a fictitious hard-coded value, the signalR is provisioned successfully.

The other thing that I noticed was that the singalr_extension key value was not populated after the function app was provisioned.

What am I missing in this exercise?


Solution

  • This feature is not available and feasible in App Service Plans. The signalr_extension must be populated manually after deploying the function app and signalR.