Reputation: 101
Is it possible to create a specialized VM image on Azure with Terraform? How? I have already uploaded the .vhd to a storage account.
Upvotes: 2
Views: 1533
Reputation: 28224
Currently, it's not possible to provision VM with Azure VM from a specialized image with built-in terraform. As a workaround, we can invoke the PowerShell scripts with local-exec
Provisioner or deploy ARM template with terraform.
From ArcturusZhang's comment in this azurerm_windows_virtual_machine fails to create when referencing a "specialised" shared gallery image.,
Despite that now azurerm provider supports creating specialized image, it does not support provision VMs or VMSSes by using the specialized images. It is implementing in PR #7524 but it is currently blocked by some inconsistency in the compute API of azure. Please stay tuned.
Also, when we capture an image of the OS Disk, currently, the only value is Generalized
for os_state
with azurerm_image
.
Upvotes: 3