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 #62

Closed
hashibot opened this issue Jun 13, 2017 · 5 comments · Fixed by #470
Closed

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

hashibot opened this issue Jun 13, 2017 · 5 comments · Fixed by #470
Labels
Milestone

Comments

@hashibot
Copy link

This issue was originally opened by @juls as hashicorp/terraform#13660. It was migrated here as part of the provider split. The original body of the issue is below.


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.
@hashibot hashibot added the bug label Jun 13, 2017
@gcarq
Copy link

gcarq commented Aug 7, 2017

Is there a workaround to attach existing images until this issue is fixed?

@aachtenberg
Copy link

aachtenberg commented Oct 11, 2017

Yep, this is still a bug in the latest version of terraform (Terraform v0.10.7) @brandontosch - any ideas when this will be fixed?

@privatwolke
Copy link
Contributor

Still an issue in terraform v0.10.8. This is preventing us from upgrading to versions >= 0.9.2. ☹️

@tombuildsstuff
Copy link
Contributor

This has been fixed via #470 and will go out in the next release

@ghost
Copy link

ghost commented Apr 1, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

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

Successfully merging a pull request may close this issue.

6 participants