小编wil*_*ion的帖子

存储帐户名称已存在

当我尝试在底部运行代码时,我收到以下错误(无论我命名存储帐户是什么),当前其名为“functions”,但我可以称其为“bannanas”,它会输出相同的错误?

我遇到的错误:(

“发生了 1 个错误:

  • azurerm_storage_account.test:发生 1 个错误:

  • azurerm_storage_account.test:创建 Azure 存储帐户“函数”时出错:storage.AccountsClient#Create:发送请求失败:StatusCode=0 -- 原始错误:autorest/azure:服务返回错误。状态= Code="StorageAccountAlreadyTaken" Message="名为functions 的存储帐户已被占用。

我的代码:

resource "azurerm_resource_group" "test" {
  name     = "azure-functions-cptest-rg"
  location = "westus2"
}

resource "azurerm_storage_account" "test" {
  name                     = "functionsapptestsa"
  resource_group_name      = "${azurerm_resource_group.test.name}"
  location                 = "${azurerm_resource_group.test.location}"
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_app_service_plan" "test" {
  name                = "azure-functions-test-service-plan"
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
  kind                = "FunctionApp"

  sku {
    tier = "Dynamic"
    size = "Y1"
  }
}

resource "azurerm_function_app" "test" {
  name                      = …
Run Code Online (Sandbox Code Playgroud)

azure terraform

6
推荐指数
1
解决办法
2998
查看次数

标签 统计

azure ×1

terraform ×1