【问题标题】:Azure Storage: Error checking for existence of existing Storage ShareAzure 存储:检查现有存储共享是否存在时出错
【发布时间】:2021-03-14 00:30:59
【问题描述】:

我正在尝试使用 Terraform 配置 Azure 存储帐户和文件共享:

resource "random_pet" "prefix" {}

provider "azurerm" {
  version = "~>2.25.0"
  features {}
}

resource "azurerm_resource_group" "default" {
  name     = "${random_pet.prefix.id}-rg"
  location = "australiaeast"
}


resource "azurerm_storage_account" "default" {
  name                = replace("${random_pet.prefix.id}storage", "-", "")
  resource_group_name = azurerm_resource_group.default.name
  location            = azurerm_resource_group.default.location
  account_tier        = "Premium"
  account_replication_type = "LRS"
}

resource "azurerm_storage_share" "default" {
  name = "${azurerm_storage_account.default.name}share"
  storage_account_name = azurerm_storage_account.default.name
}

但是我在尝试申请时遇到以下错误:

Error: Error checking for existence of existing Storage Share "patientducklingstorageshare" (Account "patientducklingstorage" / Resource Group "patient-duckling-rg"): shares.Client#GetProperties: Failure sending request: StatusCode=0 -- Original Error: Get "https://patientducklingstorage.file.core.windows.net/patientducklingstorageshare?restype=share": dial tcp: lookup patientducklingstorage.file.core.windows.net on 192.168.1.1:53: no such host

  on aks-cluster.tf line 22, in resource "azurerm_storage_share" "default":
  61: resource "azurerm_storage_share" "default" {
``

【问题讨论】:

    标签: azure terraform azure-storage terraform-provider-azure


    【解决方案1】:

    此问题已通过运行 terraform init 解决。

    【讨论】:

      猜你喜欢
      • 2020-12-23
      • 2011-02-08
      • 2014-06-06
      • 1970-01-01
      • 2013-07-05
      • 1970-01-01
      • 2017-03-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多