【问题标题】:How to get Azure Logic App Outbound IP addresses in pipeline如何在管道中获取 Azure Logic App 出站 IP 地址
【发布时间】:2020-12-28 06:52:05
【问题描述】:

我正在尝试通过 Azure SQL 服务器防火墙将 逻辑应用 列入白名单,为此,在 Azure DevOps Pipeline 中,我需要获取其或其连接器的 出站 IP 地址,对于 webapps,我通常使用这个 powershell 命令:

(Get-AzWebApp -ResourceGroup <group_name> -name <app_name>).OutboundIpAddresses

如何为逻辑应用程序/api 连接器实现相同的功能。我还读到每个区域的逻辑应用程序的 ips 是相同的,是否有 powershell 命令来获取这些 ips 并避免硬编码?

【问题讨论】:

    标签: azure-logic-apps azure-powershell powershell-4.0


    【解决方案1】:

    请试试这个方法:

    $myLogicApp = Get-AzureRmResource -ResourceGroupName "<your-resourcegroup-name>" -ResourceType Microsoft.Logic/workflows -ResourceName "<your-logic-app-name>"
    
    $myLogicApp.Properties.endpointsConfiguration.workflow.outgoingIpAddresses
    
    $myLogicApp.Properties.endpointsConfiguration.connector.outgoingIpAddresses
    

    【讨论】:

    • 我会使用较新的Az 模块而不是AzureRm
    猜你喜欢
    • 2021-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-12
    相关资源
    最近更新 更多