Azure 函数应用程序 - Microsoft.WindowsAzure.Storage : Duplicate setting 'AccountName' found

标签 azure azure-resource-manager azure-function-app

我正在使用下面的 terraform 代码部署 Azure 函数应用程序。

resource "azurerm_function_app" "function_app" {
  name                       = var.function_app_name
  resource_group_name        = var.resource_group_name
  location                   = var.location
  app_service_plan_id        = azurerm_app_service_plan.app_service_plan.id
  storage_account_name       = azurerm_storage_account.function_app_sa.name
  storage_account_access_key = azurerm_storage_account.function_app_sa.primary_connection_string
  version                    = "~3"
  app_settings                 = {
    FUNCTIONS_WORKER_RUNTIME = "dotnet"
  }
  site_config {
    always_on                = true
  }
  identity {
      type = "SystemAssigned"
  }
  tags                       = local.tags
}

terraform 创建 azure 资源没有任何问题。但是部署后,一旦我登录门户并转到资源页面,我就会在概述页面上看到错误。

Microsoft.WindowsAzure.Storage: Duplicate setting 'AccountName' found.

我不确定我是否理解该错误以及从哪里开始排除故障。任何帮助将不胜感激。

P.S: 尚未部署任何功能。这是一个空资源。

最佳答案

更新:

使用 Terraform 部署时,它会在 Function 应用程序上添加配置设置 AzureWebJobsDashboard根据 Microsoft 文档,仅版本 ~1 需要此功能。我们将其部署为版本 ~3。但 terraform 仍然添加了此配置设置,从而导致了此问题。当我删除配置设置时,错误被清除。

我们必须改用 ARM 模板部署,直到问题通过 Terraform 得到解决。我已提出错误 - https://github.com/terraform-providers/terraform-provider-azurerm/issues/8432 如果遇到此问题的任何人都可以对此问题进行投票,将会有所帮助。

关于Azure 函数应用程序 - Microsoft.WindowsAzure.Storage : Duplicate setting 'AccountName' found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63821799/

相关文章:

.net - 同一文件中的多个 azure 函数。是否也为其他功能部署了不相关的依赖项?

azure - 如何将数组转换为ARM模板中一个对象的属性?

python - 无法访问 python 的 Azure 函数

azure - 从 Azure 门户中的 Azure Function 检索源代码文件

azure - 上传的证书在多个 Azure Web 应用程序中可见

azure - 部署到 Azure 应用服务时,Umbraco 9 插件出现 Angular Controller 错误

javascript - 如何使用javascript从word文档页面中删除表格设计? Word js 插件

azure - 克隆资源组

azure - 如何使用 Azure ARM 模板自动安装 New Relic 扩展?

Azure API管理和App Function后端: Backend with id 'foo' could not be found