Skip to content

azurermLbBackendAddressPool

Manages a Load Balancer Backend Address Pool.

\~> NOTE: When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "LoadBalancerRG",
  }
);
const azurermPublicIpExample = new azurerm.publicIp.PublicIp(
  this,
  "example_1",
  {
    allocation_method: "Static",
    location: azurermResourceGroupExample.location,
    name: "PublicIPForLB",
    resource_group_name: azurermResourceGroupExample.name,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermPublicIpExample.overrideLogicalId("example");
const azurermLbExample = new azurerm.lb.Lb(this, "example_2", {
  frontend_ip_configuration: [
    {
      name: "PublicIPAddress",
      public_ip_address_id: azurermPublicIpExample.id,
    },
  ],
  location: azurermResourceGroupExample.location,
  name: "TestLoadBalancer",
  resource_group_name: azurermResourceGroupExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermLbExample.overrideLogicalId("example");
const azurermLbBackendAddressPoolExample =
  new azurerm.lbBackendAddressPool.LbBackendAddressPool(this, "example_3", {
    loadbalancer_id: azurermLbExample.id,
    name: "BackEndAddressPool",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermLbBackendAddressPoolExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created.

  • loadbalancerId - (Required) The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created.

  • tunnelInterface - (Optional) One or more tunnelInterface blocks as defined below.

  • virtualNetworkId - (Optional) The ID of the Virtual Network within which the Backend Address Pool should exist.


The tunnelInterface block supports the following:

  • identifier - (Required) The unique identifier of this Gateway Lodbalancer Tunnel Interface.

  • type - (Required) The traffic type of this Gateway Lodbalancer Tunnel Interface. Possible values are none, internal and external.

  • protocol - (Required) The protocol used for this Gateway Lodbalancer Tunnel Interface. Possible values are none, native and vxlan.

  • port - (Required) The port number that this Gateway Lodbalancer Tunnel Interface listens to.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Backend Address Pool.

  • backendIpConfigurations - The Backend IP Configurations associated with this Backend Address Pool.

  • loadBalancingRules - The Load Balancing Rules associated with this Backend Address Pool.

  • inboundNatRules - An array of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.

  • outboundRules - An array of the Load Balancing Outbound Rules associated with this Backend Address Pool.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Load Balancer Backend Address Pool.
  • update - (Defaults to 30 minutes) Used when updating the Load Balancer Backend Address Pool.
  • read - (Defaults to 5 minutes) Used when retrieving the Load Balancer Backend Address Pool.
  • delete - (Defaults to 30 minutes) Used when deleting the Load Balancer Backend Address Pool.

Import

Load Balancer Backend Address Pools can be imported using the resourceId, e.g.

terraform import azurerm_lb_backend_address_pool.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/pool1