消费层上 Azure Function App 的白名单 IP

时间:2021-07-29 01:06:05

标签: azure azure-functions

我们将一些事件发布到 Azure 服务总线并使用 Azure 函数应用作为事件处理程序。我们需要从 Azure Function App 对合作伙伴 API 进行一些出站调用,但合作伙伴想要配置一些防火墙限制。 我知道我们可以使用高级功能应用程序并实现虚拟网络 NAT 网关,以控制出站 IP,但我们正在尝试使用消费层功能应用程序以低廉的价格执行此操作...我可以看到 {{1 }} 和 outboundIpAddresses 在 Azure 资源资源管理器中的 IP 地址,位于 subscriptions > {your subscription} > providers > Microsoft.Web > sites 下。

Azure addresses in Azure Functions 中,它说:

<块引用>

outboundIpAddresses 集当前可用于该函数 应用程序。一组可能的OutboundIpAddresses 包括IP 地址 仅当功能应用扩展到其他定价时才可用 层。

<块引用>

出站IP地址的相对稳定性取决于 托管计划。

<块引用>

由于自动缩放行为,出站 IP 可以在运行时随时更改 消费计划或高级计划。

在使用消费层Function App时,似乎我不应该使用possibleOutboundIpAddresses进行白名单,但是没有明确说明outboundIpAddresses...是否可以将IP列表列入白名单来自possibleOutboundIpAddresses?这个列表有可能会改变吗?

FWIW 如果我查看 2 个不同的功能应用程序(同一区域),它们都为可能的 OutboundIpAddresses 列出了 10 个 IP,并且它们是完全不同的列表。

1 个答案:

答案 0 :(得分:1)

outboundIpAddresses 和 possibleOutboundIpAddresses 都不适用于消费函数应用。出站 IP 地址可能在 possibleOutboundIpAddresses 列表之外。

对于消费层功能应用,此场景中的解决方案是将所有数据中心出站 IP 地址列入白名单,如 documentation 中所述。