question

JoeWhite-4463 avatar image
0 Votes"
JoeWhite-4463 asked MughundhanRaveendran-MSFT commented

Problem accessing event hub using azure function when hub has "Selected networks" on

I had this azure function pulling events from azure hub but was requested to secure with "Selected networks".

I've added a list of IP addresses including the azure functions' IP to the vault and to the azure event hub and that worked. but when I do the same to the storage, it won't work

140525-image.png

the azure function uses a trigger to pull events from the hub and i believe it needs the storage because it uses event jobs.

140571-image.png

Any suggestions?


azure-functionsazure-event-hubs
image.png (21.0 KiB)
image.png (55.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MughundhanRaveendran-MSFT avatar image
0 Votes"
MughundhanRaveendran-MSFT answered MughundhanRaveendran-MSFT commented

@JoeWhite-4463 ,

Thanks for reach out to us.

The below settings needs to be added at the Function app settings if you would like to add network restriction to the storage account. Additionally service endpoints has to be enabled for Storage account. Please refer this article for more details :

https://docs.microsoft.com/en-us/azure/azure-functions/configure-networking-how-to#restrict-your-storage-account-to-a-virtual-network

WEBSITE_CONTENTOVERVNET = 1.
WEBSITE_VNET_ROUTE_ALL = 1.
WEBSITE_DNS_SERVER =168.63.129.16 (applicable when you are using Azure DNS)

Please take a look at this article, if you would like to know about the above app settings : https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings

Apart from the details that you mentioned, Azure function uses Storage account to store the source code, app secrets and keys. So it is critical for a function app to be able to reach the storage account.

I hope this helps!

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JoeWhite-4463 ,

Just wondering if you had chance to look into the above answer.

Please let me know if it was helpful

0 Votes 0 ·