Edit existing load balancer to add front end ip configuration

I want to add a new front end ip configuration to an existing LB.

The example in the docs shows only how to create a new LB. I tried doing that anyway just to see if the azure provider would be smart enough to understand that there is already an LB with the name I put, but it wasn’t and terraform plan shows that it’ll try to create a new LB. This is what I have:

resource "azurerm_lb" "hmg-loadbalancer" {
  name                = "the-name-of-an-existing-load-balancer-in-this-resource-group"
  location            = data.azurerm_resource_group.resource_group.location
  resource_group_name = data.azurerm_resource_group.resource_group.name
  sku                 = "Standard"

  frontend_ip_configuration {
    name                 = "a new frontend ip config"
    public_ip_address_id = azurerm_public_ip.msging-storage-httptransport-ip.id
  }
}

This is what the plan shows:

  # azurerm_lb.hmg-loadbalancer will be created
  + resource "azurerm_lb" "hmg-loadbalancer" {
      + id                   = (known after apply)
      + location             = "brazilsouth"
      + name                 = "hmg-loadbalancer"
      + private_ip_address   = (known after apply)
      + private_ip_addresses = (known after apply)
      + resource_group_name  = "redacted"
      + sku                  = "Standard"
      + tags                 = (known after apply)

      + frontend_ip_configuration {
          + id                            = (known after apply)
          + inbound_nat_rules             = (known after apply)
          + load_balancer_rules           = (known after apply)
          + name                          = "msging-storage-httptransport"
          + outbound_rules                = (known after apply)
          + private_ip_address            = (known after apply)
          + private_ip_address_allocation = (known after apply)
          + public_ip_address_id          = (known after apply)
          + public_ip_prefix_id           = (known after apply)
          + subnet_id                     = (known after apply)
        }
    }

I’m at the same situation, Were you able to find a solution?

I’ve been researching with no luck

Thanks!

Here the thread in github for reference