'Azure Load Balancer uses zone 1 since subscription xxx-xxx-xxx-xxx does not support zone 1 in location westus

I am trying to create a load balancer in Azure using terraform but I am getting this error:

Error: creating/updating Load Balancer "lbclassic" (Resource Group "apim-appGw-RG"): network.LoadBalancersClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="SubscriptionDoesNotSupportZone" Message="Cannot create/move resource /subscriptions/xxx-xxx-xxx-xxx/resourceGroups/apim-appGw-RG/providers/Microsoft.Network/loadBalancers/lbclassic/frontendIPConfigurations/lbclassic which uses zone 1 since subscription xxx-xxx-xxx-xxx does not support zone 1 in location westus." Details=[] │ │ with azurerm_lb.example, │ on 12-lb.tf line 1, in resource "azurerm_lb" "example": │ 1: resource "azurerm_lb" "example" {

And here's my code sample:

resource "azurerm_lb" "example" {
  name                = "lbclassic"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  sku                 = "Standard"

  frontend_ip_configuration {
    name                          = "lbclassic"
    subnet_id                     = azurerm_subnet.lb.id
    private_ip_address_allocation = "Dynamic"
  }
}

Can someone please help me on this?



Solution 1:[1]

I was having the same issue. It only fails on West US

I fixed it by adding availability_zone ="No-Zone" under frontend_ip_configuration

frontend_ip_configuration {
name                          = "SQLFrontEnd"
#subnet_id                     = var.lb_azure_subnet_id
subnet_id=var.subnetid
private_ip_address_allocation = "Static"
private_ip_address            = var.sql_front_end_ip
availability_zone ="No-Zone"

Solution 2:[2]

Azure location 'westus' doesn't support availability zones.

See Azure regions with Availability Zones for the ones that do.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 SolverDude