Search code examples
functionazure-functionsazure-eventhub

Functions triggered by Eventhub


We have an existing solution where there is an Eventhub ingests real time event data from a source. We are using a SAS key for authentication and authorization. For additional security we have whitelisted the IPs of the source on the Eventhub. We also have a databricks instance within a VNET reading from this eventhub. The VNET has been whitelisted on the Eventhub as well.

We now have a new requirement to read off the Eventhub using Azure functions. The problem is since we have enabled IP whitelisting on the Eventhub, we need to whitelist the IPs of the functions as well and we can't figure out which Inbound IPs to whitelist on the Eventhub. The documentation says that the inbound IPs remain mostly the same but can change for Consumption plan which is what we intend to use.

Does that mean the only other solution is that we need to whitelist the entire Azure region where our functions are hosted using the list in the link Azure service IPs? Any other suggestions what we can try?


Solution

  • Does that mean the only other solution is that we need to whitelist the entire Azure region where our functions are hosted? Any other suggestions what we can try?

    Yes, if you don't know the outbound ip address of azure function app, please add the ip region to the whitelist. You could get those here.

    More realistic option: You can put your function app in a azure VNET and let the VNET to access the Event Hub. However, this requires a AppService Plan or Premium Consumption Plan Function.

    enter image description here enter image description here enter image description here