Azure Load Balancer Backend Address Pool Address

This page shows how to write Terraform and Azure Resource Manager for Load Balancer Backend Address Pool Address and write them securely.

azurerm_lb_backend_address_pool_address (Terraform)

The Backend Address Pool Address in Load Balancer can be configured in Terraform with the resource name azurerm_lb_backend_address_pool_address. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L1
resource "azurerm_lb_backend_address_pool_address" "example" {
  name                    = var.name
  backend_address_pool_id = data.azurerm_lb_backend_address_pool.example.id
  virtual_network_id      = data.azurerm_virtual_network.example.id
  ip_address              = var.ip_address
lbbackendaddresspooladdress.tf#L5
resource "azurerm_lb_backend_address_pool_address" "example" {
  name                    = var.lb_backendaddresspooladdress_name
  backend_address_pool_id = var.lb_backendaddresspooladdress_backend_address_pool_id
  virtual_network_id      = var.lb_backendaddresspooladdress_virtual_network_id
  ip_address              = var.lb_backendaddresspooladdress_ip_address
}
add_vm_lb.tf#L23
resource "azurerm_lb_backend_address_pool_address" "example" {
  name                    = "BackEndAddressPool"
  backend_address_pool_id = data.azurerm_lb_backend_address_pool.example.id
  virtual_network_id      = data.azurerm_virtual_network.example.id
  ip_address              = "10.0.2.5" # Private IP of VM to be added in backend Pool
}
az-main-waflb.tf#L42
resource "azurerm_lb_backend_address_pool_address" "wafadx1" {
  name                    = "waf1-external"
  backend_address_pool_id = azurerm_lb_backend_address_pool.waflb-be-pool.id
  virtual_network_id      = azurerm_virtual_network.main-vnet.id
  ip_address              = var.az-waflb["be-pool-wafadx1"]
}
az-main-eglb.tf#L42
resource "azurerm_lb_backend_address_pool_address" "eglbadx1" {
  name                    = "efw1-trust"
  backend_address_pool_id = azurerm_lb_backend_address_pool.eglb-be-pool.id
  virtual_network_id      = azurerm_virtual_network.main-vnet.id
  ip_address              = var.az-eglb["be-pool-eglbadx1"]
}
az-main-inlb.tf#L50
resource "azurerm_lb_backend_address_pool_address" "inlbadx1" {
  name                    = "infw1-untrust"
  backend_address_pool_id = azurerm_lb_backend_address_pool.eglb-be-pool.id
  virtual_network_id      = azurerm_virtual_network.main-vnet.id
  ip_address              = var.az-inlb["be-pool-inlbadx1"]
}
main_azure.tf#L220
resource "azurerm_lb_backend_address_pool_address" "beapa1-dobrozhan" {
  name                    = "beapa1-dobrozhan"
  backend_address_pool_id = azurerm_lb_backend_address_pool.beap-dobrozhan.id
  virtual_network_id      = azurerm_virtual_network.vnet-dobrozhan.id
  ip_address              = "10.0.20.4"
}
main.tf#L189
resource "azurerm_lb_backend_address_pool_address" "main-vm1" {
  name                    = "main-vm1"
  backend_address_pool_id = azurerm_lb_backend_address_pool.main-vms.id
  virtual_network_id      = azurerm_virtual_network.main-vnet.id
  ip_address              = "40.76.49.76"
}
az-main-infrasrv-lb.tf#L42
resource "azurerm_lb_backend_address_pool_address" "infrasrvlbadx1" {
  name                    = "dns1"
  backend_address_pool_id = azurerm_lb_backend_address_pool.infrasrvlb-be-pool.id
  virtual_network_id      = azurerm_virtual_network.main-vnet.id
  ip_address              = var.az-infrasrvlb["be-pool-infrasrvlbadx1"]
}
main.tf#L117
resource "azurerm_lb_backend_address_pool_address" "vm1" {
    name                    = "vm1"
    backend_address_pool_id = azurerm_lb_backend_address_pool.vms.id
    virtual_network_id      = azurerm_virtual_network.webhub.id
    ip_address              = azurerm_linux_virtual_machine.vm1.private_ip_address
}

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Backend Address within a Backend Address Pool. -> Note: Backend Addresses can only be added to a Standard SKU Load Balancer.

Microsoft.Network/loadBalancers/backendAddressPools (Azure Resource Manager)

The loadBalancers/backendAddressPools in Microsoft.Network can be configured in Azure Resource Manager with the resource name Microsoft.Network/loadBalancers/backendAddressPools. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • name required - string
  • type required - string
  • apiVersion required - string
  • properties required
      • location optional - string

        The location of the backend address pool.

      • loadBalancerBackendAddresses optional array
          • properties optional
              • virtualNetwork optional
                  • id required - string

                    Resource ID.

              • subnet optional
                  • id required - string

                    Resource ID.

              • ipAddress optional - string

                IP Address belonging to the referenced virtual network.

              • loadBalancerFrontendIPConfiguration optional
                  • id required - string

                    Resource ID.

          • name optional - string

            Name of the backend address.

Frequently asked questions

What is Azure Load Balancer Backend Address Pool Address?

Azure Load Balancer Backend Address Pool Address is a resource for Load Balancer of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Load Balancer Backend Address Pool Address?

For Terraform, the VentsislavDinev/en_sample, cantrellcloud/tfAzureModules and foram31k/terraform_azure-lb-vm source code examples are useful. See the Terraform Example section for further details.