This link does not give me enough detail on how to write the option of choosing a specific availability zone for a VM that will be deployed using azure terraform.
zones - (Optional) A list of a single item of the Availability Zone which the Virtual Machine should be allocated in.
resource "azurerm_virtual_machine" "main" {
name = "${var.prefix}-vm"
location = "${azurerm_resource_group.main.location}"
resource_group_name = "${azurerm_resource_group.main.name}"
network_interface_ids = ["${azurerm_network_interface.main.id}"]
vm_size = "Standard_DS1_v2"
# Zone info
zones = [1]
[...]
The Availability Zone identifiers (the numbers 1, 2 and 3 in the picture above) are logically mapped to the actual physical zones for each subscription independently. That means that Availability Zone 1 in a given subscription might refer to a different physical zone than Availability Zone 1 in a different subscription. As a consequence, it’s recommended to not rely on Availability Zone IDs across different subscriptions for virtual machine placement.