O nome da conta de armazenamento já existe

1

Quando eu tento executar o código na parte inferior eu recebo o seguinte erro (não importa o que eu nomeie a conta de armazenamento) atualmente seu chamado "funções", mas eu poderia chamá-lo "bannanas" e seria o mesmo erro?

ERROR I ENCOUNTER :(

"1 error(s) occurred:

  • azurerm_storage_account.test: 1 error(s) occurred:

  • azurerm_storage_account.test: Error creating Azure Storage Account "functions": storage.AccountsClient#Create: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status= Code="StorageAccountAlreadyTaken" Message="The storage account named functions is already taken."

Meu código:

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                      = "test-azure-functions"
  location                  = "${azurerm_resource_group.test.location}"
  resource_group_name       = "${azurerm_resource_group.test.name}"
  app_service_plan_id       = "${azurerm_app_service_plan.test.id}"
  storage_connection_string = "${azurerm_storage_account.test.primary_connection_string}"
}
    
por wildstallion 17.11.2018 / 22:30

1 resposta

3

Isso acontece porque o nome da conta de armazenamento é UNIQUE em todo o Azure, tente algo mais exclusivo:)

Como: functions12df3f4g ou rebgh35h3brw4t3ghr

    
por 17.11.2018 / 22:32