0

我们有一些 Linux 集群(每台两台机器)在 Azure 上运行,我们希望集群的每个节点都在不同的区域中创建并使用可用性集。

我们正在尝试使用 Terraform 在 Azure 上创建 VM:

resource "azurerm_linux_virtual_machine" "move-az-test" {
  count                            = "1"
  name                             = "move-az-test01"
  location                         = var.azure_location_short
  resource_group_name              = azurerm_resource_group.rg.name
  size                             = "Standard_B1S"
  zone                             = 1
  computer_name                    = "move-az01"
  disable_password_authentication  = true
  admin_username                   = var.os_user
  admin_password                   = var.os_password
  availability_set_id              = azurerm_availability_set.avset.id
  network_interface_ids            = [azurerm_network_interface.move-az-nic.id]

  source_image_reference {
    publisher = "OpenLogic"
    offer     = "CentOS"
    sku       = "7.6"
    version   = "latest"
  }

  os_disk {
    name                 = "move-az-test0_OsDisk"
    caching              = "ReadWrite"
    disk_size_gb         = "128"
    storage_account_type = "Standard_LRS"
  }
}

但是我们有消息错误:错误:“区域”:与可用性集ID冲突

4

1 回答 1

0

简短的回答是可用性集可用性区域不能同时存在。您可以更深入地了解它们。前者在虚拟机的逻辑分组中,后者提高了物理区域的可用性。

于 2021-05-18T06:28:15.953 回答