AppService 访问限制和来自发布管道的访问

时间:2021-03-02 20:40:00

标签: azure azure-devops azure-web-app-service

作为我部署的一部分,我想在我的应用程序中调用某个端点来对其进行冒烟测试。 但是我们正在使用访问限制,并且拒绝来自 Azure Devops Release Pipeline 的调用。 有没有办法解决这个问题?

1 个答案:

答案 0 :(得分:1)

在提出问题后,我注意到 Azure 门户的访问限制页面中的预览中有一个新选项。

enter image description here

通过此规则,Azure Devops 将能够访问应用程序端点。

或者使用 Powershell

Add-AzWebAppAccessRestrictionRule
  -ResourceGroupName "resourcegroup"
  -WebAppName "webapi"
  -Priority 65000
  -ServiceTag Azurecloud
  -Action Allow

将来您应该可以使用 AzureDevOps 服务标签,但预览版似乎不支持它 - Set a service tag-based rule (preview)