terraform-azurerm-compute icon indicating copy to clipboard operation
terraform-azurerm-compute copied to clipboard

move to azurerm_linux_virtual_machine

Open sudoapt-getclean opened this issue 5 years ago • 2 comments

I'm wondering if you guys have a migration to change the internals of this module to make use of the azurerm_linux_virtual_machine

According to the provider documentation. Note: The azurerm_virtual_machine resource has been superseded by the azurerm_linux_virtual_machine and azurerm_windows_virtual_machine resources. The existing azurerm_virtual_machine resource will continue to be available throughout the 2.x releases however is in a feature-frozen state to maintain compatibility - new functionality will instead be added to the azurerm_linux_virtual_machine and azurerm_windows_virtual_machine resources.

I did a quick and dirty rewrite and didn't see any problems (i'm only really interested in the linux part though) I do see some problem for existing users, since Terraform will obiously want to destroy and recreate the macines. (I tested that it is possible to upgrade the resource type by deleting the old resource and re-importing it as the azurerm_linux_virtual_machine. (and that is pretty scriptable if you have multiple machines))

anyway I wanted to quickly hear what your thoughts are on this matter.

sudoapt-getclean avatar Oct 13 '20 19:10 sudoapt-getclean

Thanks for opening this issue!

azureterraformbot[bot] avatar Oct 13 '20 19:10 azureterraformbot[bot]

Hi @sudoapt-getclean Thanks for your suggestion. While azurerm_linux_virtual_machine doesn't support attaching existing OS Disks, it may break our users. I'll not migrate to azurerm_linux_virtual_machine immediately. But I'll keep this issue open. And in the long term, we'll migrate to azurerm_linux_virtual_machine.

yupwei68 avatar Nov 20 '20 02:11 yupwei68

I'm closing this issue since we've migrated new module to Azure organization, any further issue could be raised there. Thanks for your participating folks!

lonegunmanb avatar Jan 17 '23 10:01 lonegunmanb