简体   繁体   中英

Get IP address of an azure Function running on Consumption plan

I have two Azure functions, one is running on Premium plan that gives me "Outbound IP addresses" while the second one is running on consumption plan that only gives me "Virtual IP address" . Below are screen-shots from their properties tab.

在此处输入图片说明

在此处输入图片说明

I have Network Security Group for which I am trying to only allow Inbound traffic from these two azure functions. I have updated the NGS policy with "Outbound IP address" of the Premium Azure function, as well as the "Virtual IP Address" of Consumption plan.

The premium function is able to communicate with the Network Security group afterwards, however, I am not able to get it to work for the Consumption plan.

Is there a way I can get the "Outbound IP address" for functions running on Consumption plan?

What are the options I have to get this working?

In Azure, Azure functions hosting on a different hosting plan have different features . Outbound IP restrictions do not support in the Consumption plan. It does not directly expose the outbound IP addresses of the function app. You can not add the "Virtual IP Address" of the Consumption plan. You could add the possibleOutboundIpAddresses of the Function app into the inbound of NSG rules.

However, the possible outbound IP address list may change or update.

When a function app that runs on the Consumption plan or the Premium plan is scaled, a new range of outbound IP addresses may be assigned. When running on either of these plans, you may need to add the entire data center to an allow list.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM