Azure function with Consumption plan can't access stroage account

Heeralal paliwal 21 Reputation points
2022-01-14T07:43:48.177+00:00

I have created a Azure function using Consumption plan both Azure function and storage account are in same Azure Region (UK South). I want to secure my storage account so that only Azure function can use this. I have allowed all the outbound public ip addresses of Azure function in my storage account but still getting error. "Azure functions runtime is unreachable"

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,856 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,088 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,126 Reputation points
    2022-01-14T08:04:23.303+00:00

    @Heeralal paliwal You need to allow both outboundIpAddresses and possibleOutboundIpAddresses as mentioned in this document if your storage and function app is in different region.
    Please note that IP addresses can be changed in some scenarios as mentioned in the document.

    To troubleshoot the error: "Azure Functions Runtime is unreachable" I will suggest reviewing this document which can help you in resolving the issue.
    If you are still facing the issue then please let me know so we can connect offline to assist you further.

    Update:
    In case if the storage account and function app are in the same region then setting up function apps with restricted networks requires additional setup due to the way communication to storage irrespective of the subscription as mentioned in storage documentation.

    To restrict access to Azure services deployed in the same region as the storage account.

    Services deployed in the same region as the storage account use private Azure IP addresses for communication. Thus, you can't restrict access to specific Azure services based on their public outbound IP address range.

    You can refer to Restrict your storage account to a virtual network for more details on how you can set up it. Please refer to the Note section that the consumption plan is not supported with this configuration.

    This feature currently works for all Windows virtual network-supported SKUs in the Dedicated (App Service) plan and for Windows Elastic Premium plans. ASEv3 is not supported yet. It is also supported with private DNS for Linux virtual network-supported SKUs. Consumption and custom DNS for Linux plans aren't supported.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.