-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Delete managed OS disk when destroying VM #127
Comments
I can confirm this behaviour +1 |
Huh, I'll have to give that a try. Thought I had read over all the flags, but apparently that one didn't stick in my head. Will report back once I get to try it. |
Is there a way we can improve the documentation so that you would have found this more easily? Thx. |
Only suggestion I have is to include it in one of the examples. Overall the examples are so good you don't usually need to look much at the detailed options to get going. |
This works as advertised. |
To summarize - the behavior noted is by design. If users want to have the OS or data disks deleted with the VM, they can use the delete_{os,data}_disk{,s}_on_termination flags. Looking into whether the docs can make this easier to find. |
Associated PR: #139 |
[MS] Fixes #127 Improve docs for delete_os_disk_on_termination
[MS] Fixes #127 Improve docs for delete_os_disk_on_termination
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 👉 hashibot-feedback@hashicorp.com. Thanks! |
Given an
azurerm_virtual_machine
using a managed OS disk is created then destroyed. The same configuration can not be reused because the managed OS disk resource still exists. When a VM is destroyed and has a managed OS disk, the OS disk should be destroyed too to prevent leaking of resources.Data disks have the problem too, but it can be mitigated using the
azurerm_managed_disk
resource separately and linking to that created instance in thestorage_data_disk
block. The OS block can not do this due toazurerm_managed_disk
not supporting creationFromImage
.The text was updated successfully, but these errors were encountered: