从门户部署逻辑应用时无法在存储帐户中创建文件共享

Can't create a file share in a storage account while deploying Logic App from the Portal

我在从门户创建逻辑应用程序时遇到以下错误。

"Creation of storage file share failed with: 'The remote server returned an error: (403) Forbidden.'. Please check if the storage account is accessible."

在选择初始逻辑应用配置时,我选择了一个现有的存储帐户,该帐户应允许从 azure 可信服务(配置如下)进行访问。

如果存储帐户中定义了专用端点(如下图所示),但也没有定义专用端点,这将失败。由于“允许 Azure 可信服务”设置已打开,我相信这些不应该禁止 public 流量,并且可信服务应该能够通过 Azure backbone 与存储帐户通信。对吗?

但假设 Azure 资源管理器不是受信任的 Azure 服务,我将 Azure 资源管理器列入白名单 IP addresses,结果还是一样。

知道这里可能有什么问题吗?

如果目标存储帐户隐藏在防火墙后面,似乎无法从门户部署标准逻辑应用程序。解决方法是 deploy the Standard Logic app via ARM template。将会发生的是首先创建存储帐户和文件共享,然后在其上启用防火墙。

资源将按以下顺序创建:

  1. 拒绝 public 流量的存储帐户。

  2. VNET 和子网。

  3. 用于 blob、文件、队列和 table 服务的专用 DNS 区域和专用端点。

  4. 文件共享(Logicapp App 设置需要文件共享来创建主机运行时目录和文件)。

  5. 用于托管标准逻辑应用资源的应用服务计划(工作流标准 -WS1)。

  6. 标准逻辑应用程序,并使用 VNET 集成设置网络配置(以连接到专用端点上的存储帐户)。

更多信息here

您可以使用以下脚本使您的存储帐户 public 可访问,然后您可以尝试通过 Terraform 进行部署: 注意:请添加至少 120 秒的延迟以应用更改。

az storage account update --name ${{ parameters.storage_account }} --default-action Allow
az storage account update --name ${{ parameters.storage_account }} --allow-blob-public-access true
Start-Sleep -s 120

部署完成后,您可以使用以下脚本禁用 public 访问权限:

az storage account update --name ${{ parameters.storage_account }} --default-action Deny
az storage account update --name ${{ parameters.storage_account }} --allow-blob-public-access false

您可以将上述任务作为内联脚本添加到您的 CI/CD 管道中。