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

Parallelized data disk deletion #184

Closed
cehoffman opened this issue Jul 21, 2017 · 4 comments · Fixed by #5550
Closed

Parallelized data disk deletion #184

cehoffman opened this issue Jul 21, 2017 · 4 comments · Fixed by #5550

Comments

@cehoffman
Copy link

This is with terraform 0.9.11 on the azurerm_virtual_machine resource with delete_data_disks_on_termination set to true. This process seems to delete the data disks in a serial manner which greatly extends the time that the terraform operation takes. If I uses separately provisioned managed disks then terraform automatically parallelizes the deletion and for as few as 8 disks the time takes 3-4 times faster than with the flag on the azurerm_virtual_machine.

@achandmsft
Copy link
Contributor

As this is a delete operation that is not failing or timing out, switching from bug to enhancement.

@tombuildsstuff tombuildsstuff modified the milestones: 1.4.0, Temp/To Be Sorted Apr 17, 2018
@katbyte katbyte removed the M1 label May 17, 2018
@katbyte katbyte modified the milestones: Temp/To Be Sorted, Future May 17, 2018
@JunyiYi JunyiYi self-assigned this Aug 9, 2018
@tombuildsstuff tombuildsstuff modified the milestones: Future, Being Sorted Oct 25, 2018
@tombuildsstuff
Copy link
Contributor

hi @cehoffman

We're currently working on version 2.0 of the Azure Provider which we previously announced in #2807.

As a part of this we're introducing five new resources which will supersede the existing azurerm_virtual_machine and azurerm_virtual_machine_scale_set resources:

  • azurerm_linux_virtual_machine
  • azurerm_linux_virtual_machine_scale_set
  • azurerm_virtual_machine_scale_set_extension
  • azurerm_windows_virtual_machine
  • azurerm_windows_virtual_machine_scale_set

We recently opened #5550 which adds support for the new Virtual Machine resources - for the new Virtual Machine resources Data Disk Attachments are handled entirely through the azurerm_virtual_machine_data_disk_attachment resource - as such deleting Data Disks will now be handled via Terraform's native parallelisation which should resolve this. It's also possible to use the azurerm_virtual_machine_data_disk_attachment resource with the existing azurerm_virtual_machine resource so you should be able to achieve the same thing by using this resource rather than defining the disks inline.

In order to get feedback on these new resources we'll be launching support for these new resources as an opt-in Beta in an upcoming 1.x release of the Azure Provider and ultimately release these as "GA" in the upcoming 2.0 release. We'll post an update in #2807 when both the opt-in Beta (1.x) & GA (2.0) are available - as such I'd recommend subscribing to that issue for updates.

This issue's been assigned to the milestone "2.0" since this is where this will ship - however (due to the way that closing Github Issues from PR's works, to be able to track this back for future users) this issue will be closed once the first of the new resources have been merged.

Thanks!

@ghost
Copy link

ghost commented Feb 24, 2020

This has been released in version 2.0.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.0.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 5, 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 Mar 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.