I'm trying to create a VM in Azure using Terraform. I can create the VM directly in Azure Marketplace. However, I'm interested in using Terraform for that.
It's a Linux VM machine, and I'm aware of the block source_image_reference
belonging to the resource azurerm_linux_virtual_machine
.
This block looks like this:
source_image_reference {
publisher = "Canonical"
offer = "UbuntuServer"
sku = "16.04-LTS"
version = "latest"
}
How am I supposed to fulfill such block using an image from Azure Marketplace?
Cheers
EDIT 1
The source_image_reference shown above is just an example. Actually, the very example available on Terraform's site. The image I want to use is SQL Server 2019 on Ubuntu Server 20.04 LTS
However, I'd say that the question is more general. I mean, once I find an image in Azure Marketplace, how could I use it in Terraform plans?