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

Support for deploying azurerm_*_virtual_machine from existing managed disk #12943

Closed
MMollyy opened this issue Aug 11, 2021 · 2 comments
Closed

Comments

@MMollyy
Copy link

MMollyy commented Aug 11, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

In the previous azurerm_virtual_machine there was the capability to deploy a VM from an existing managed disk. (both a managed disk imported to the state or one that isn't)
However the new resources don't seem to support this. I'm unsure if that is intentional or not?

New or Affected Resource(s)

  • azurerm_windows_virtual_machine
  • azurerm_linux_virtual_machine

Previous Terraform Configuration

resource "azurerm_virtual_machine" "VM1" {
  resource_group_name = azurerm_resource_group.rg.name
  name                = "VM1"
  delete_os_disk_on_termination = true

  network_interface_ids = [azurerm_network_interface.VM1-nic1.id]
  location              = var.azure-region

  storage_os_disk {
    name = "VM1-restored-osdisk-20210810-132929"
    create_option = "Attach"
    caching = "None"
    os_type = "Windows"
    managed_disk_id = "/subscriptions/1234/resourceGroups/rg/providers/Microsoft.Compute/disks/VM1-restored-osdisk-20210810-132929"
  }

  vm_size                       = "Standard_A2_v2"

  os_profile_windows_config {}
}
@tombuildsstuff
Copy link
Contributor

hi @MMollyy

Thanks for opening this issue :)

Taking a look through this appears to be a duplicate of #8195 - rather than having multiple issues open tracking the same thing I'm going to close this issue in favour of that one; would you mind subscribing to #8195 for updates?

Thanks!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2021
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

2 participants