Hi there,
since this commit, a existing _azurerm_storage_blob_ can't be attached to a _azurerm_virtual_machine_ anymore. It fails because this test only allows attaching a managed disk.
Terraform v0.9.3
Based on the azurerm_virtual_machine example:
resource "azurerm_storage_blob" "test" {
name = "datadisk0.vhd"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
storage_container_name = "${azurerm_storage_container.test.name}"
source_uri = "https://accsa.blob.core.cloudapi.de/images/empty-1024gb.vhd"
type = "page"
size = "1099511627776"
}
resource "azurerm_virtual_machine" "test" {
[...]
storage_data_disk {
name = "datadisk0"
vhd_uri = "${azurerm_storage_account.test.primary_blob_endpoint}${azurerm_storage_container.test.name}/datadisk0.vhd"
disk_size_gb = "1023"
create_option = "Attach"
lun = 0
}
[...]
An existing image should be attached. This worked fine until Terraform v0.9.2.
Since this was added, it fails with
* azurerm_virtual_machine.test: [ERROR] Must specify which disk to attach
terraform applyIck, my bad. I'll get a PR open for the fix as soon as I can.
Opened PR #13686 for the fix.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Ick, my bad. I'll get a PR open for the fix as soon as I can.