环境:
Terraform v0.11.0
+ provider.azurerm v0.3.3
+ provider.tls v1.0.1
问题:
尝试在正在配置的 VM 上附加现有磁盘,出现如下错误:
* azurerm_virtual_machine.kafka_vm: compute.VirtualMachinesClient#CreateOrUpdate: Failure responding to request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status=409 Code="PropertyChangeNotAllowed" Message="Changing property 'dataDisk.name' is not allowed."
这里是vm.tf
:
storage_data_disk {
name = "${var.env_short_name}-zookeeper-data01"
managed_disk_id = "${var.kafka_data_image_id}"
create_option = "Attach"
disk_size_gb = "30"
lun = 5
}
..where是用现有磁盘的完整路径定义managed_disk_id
的变量(即)。$var.kafka_data_image_id
例子:
kafka_data_image_id = "/subscriptions/XXXXX-fcf3-4ec6-b598-XXXXXXXXXXXX/resourceGroups/TEST-Environment-test0001-rg/providers/Microsoft.Compute/disks/test1-kafka-data01"
我试图提供""
姓名,但它错误地告诉我必须提供姓名。关于我做错了什么的任何指示?
谢谢!!