storage_os_disk在Azure门户中被标记了,这不是我想要的每个标记指定运行簿时想要的东西,可以避免这种继承吗?
答案 0 :(得分:0)
您可以使用azurerm_managed_disk
单独创建os磁盘,然后使用this引用该现有磁盘。您需要为托管磁盘使用FromImage创建选项。
storage_os_disk {
name = "myosdisk1"
caching = "ReadWrite"
create_option = "Attach"
managed_disk_id = "disk_resource_id"
}
resource "azurerm_managed_disk" "test" {
name = "acctestmd"
location = "West US 2"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_type = "Standard_LRS"
create_option = "FromImage"
image_reference_id = "platformi_image_resource_id"
disk_size_gb = "32"
}