Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_storage_blobs can't be attached to vms since v.0.9.3 #13660

Closed
juls opened this issue Apr 14, 2017 · 3 comments
Closed

azurerm_storage_blobs can't be attached to vms since v.0.9.3 #13660

juls opened this issue Apr 14, 2017 · 3 comments

Comments

@juls
Copy link
Contributor

juls commented Apr 14, 2017

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 Version

Terraform v0.9.3

Affected Resource(s)

  • azurerm_virtual_machine
  • azurerm_storage_blob

Terraform Configuration Files

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
  }
[...]

Expected Behavior

An existing image should be attached. This worked fine until Terraform v0.9.2.

Actual Behavior

Since this was added, it fails with
* azurerm_virtual_machine.test: [ERROR] Must specify which disk to attach

Steps to Reproduce

  1. Take the example from the documentation
  2. Add the above mentioned azurerm_storage_blob. source_uri can be any existing image.
  3. Change the create_option to Attach, as shown above to attach that existing image.
  4. run terraform apply
  5. After a while, see the above mentioned error message.
@brandontosch
Copy link
Contributor

Ick, my bad. I'll get a PR open for the fix as soon as I can.

@brandontosch
Copy link
Contributor

Opened PR #13686 for the fix.

@ghost
Copy link

ghost commented Apr 9, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants