Azure Infrastructure

Creating High-Availability Virtual Machines on Azure

Eduardo Noyola
Eduardo Noyola
Nov 20, 2025 8 min read

High-Availability on Azure

99.99% SLA with Availability Zones & Terraform

In the world of enterprise cloud architecture, uptime is everything. When designing solutions for clients across Latin America, one request I encounter constantly is: "How do we ensure our application stays online even if a data center fails?"

The answer lies in understanding the difference between Azure Availability Sets and Availability Zones. In this guide, I'll walk you through how to architect a solution that offers a 99.99% SLA using Terraform.

The 99.99% SLA Requirement

Microsoft offers different Service Level Agreements (SLAs) depending on how you deploy your VMs. A single VM with Premium SSD storage gives you 99.9%. But to reach the gold standard of 99.99%, you must deploy across multiple Availability Zones.

Pro Tip: FinOps Consideration

Deploying across zones incurs inter-zone data transfer costs. Always estimate these egress costs using the Azure Calculator before implementation.

Implementation with Terraform

Manual configuration in the portal is prone to human error. Here is the exact Terraform module structure I use to provision zoned VMs for my clients.

main.tf
resource "azurerm_linux_virtual_machine" "main" {
  name                = "prod-vm-web-01"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  size                = "Standard_D2s_v3"
  admin_username      = "adminuser"
  
  # CRITICAL: Define the specific zone
  zone                = "1" 

  network_interface_ids = [
    azurerm_network_interface.example.id,
  ]

  os_disk {
    caching              = "ReadWrite"
    storage_account_type = "Premium_LRS"
  }

  source_image_reference {
    publisher = "Canonical"
    offer     = "UbuntuServer"
    sku       = "18.04-LTS"
    version   = "latest"
  }
}

Notice the `zone` parameter. To achieve high availability, you would loop this resource creation to deploy a secondary VM in `zone = "2"` and place both behind a Standard Load Balancer.

Validating the Architecture

Once deployed, you can verify the distribution using the Azure CLI. I’ve written a custom Bash script that checks the zonal status of all VMs in a resource group.

Conclusion

Designing for failure is the hallmark of a Senior Cloud Architect. By leveraging Availability Zones and automating the deployment with Terraform, you ensure your client's infrastructure is robust, compliant, and ready for scale.

Eduardo Noyola

Eduardo Noyola

Cloud & AI Engineer · Founder of ZoniteAI

Eduardo has spent 5+ years architecting multi-cloud solutions for 100+ enterprise clients across Azure, AWS, and GCP. He now builds AI agents and automations at ZoniteAI.

Read Next