Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.15.0 published on Wednesday, Aug 17, 2022 by Pulumi

BackendAddressPool

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

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var examplePublicIp = new Azure.Network.PublicIp("examplePublicIp", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        AllocationMethod = "Static",
    });

    var exampleLoadBalancer = new Azure.Lb.LoadBalancer("exampleLoadBalancer", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        FrontendIpConfigurations = new[]
        {
            new Azure.Lb.Inputs.LoadBalancerFrontendIpConfigurationArgs
            {
                Name = "PublicIPAddress",
                PublicIpAddressId = examplePublicIp.Id,
            },
        },
    });

    var exampleBackendAddressPool = new Azure.Lb.BackendAddressPool("exampleBackendAddressPool", new()
    {
        LoadbalancerId = exampleLoadBalancer.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/lb"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		examplePublicIp, err := network.NewPublicIp(ctx, "examplePublicIp", &network.PublicIpArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			AllocationMethod:  pulumi.String("Static"),
		})
		if err != nil {
			return err
		}
		exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "exampleLoadBalancer", &lb.LoadBalancerArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
				&lb.LoadBalancerFrontendIpConfigurationArgs{
					Name:              pulumi.String("PublicIPAddress"),
					PublicIpAddressId: examplePublicIp.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = lb.NewBackendAddressPool(ctx, "exampleBackendAddressPool", &lb.BackendAddressPoolArgs{
			LoadbalancerId: exampleLoadBalancer.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.PublicIp;
import com.pulumi.azure.network.PublicIpArgs;
import com.pulumi.azure.lb.LoadBalancer;
import com.pulumi.azure.lb.LoadBalancerArgs;
import com.pulumi.azure.lb.inputs.LoadBalancerFrontendIpConfigurationArgs;
import com.pulumi.azure.lb.BackendAddressPool;
import com.pulumi.azure.lb.BackendAddressPoolArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .allocationMethod("Static")
            .build());

        var exampleLoadBalancer = new LoadBalancer("exampleLoadBalancer", LoadBalancerArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .frontendIpConfigurations(LoadBalancerFrontendIpConfigurationArgs.builder()
                .name("PublicIPAddress")
                .publicIpAddressId(examplePublicIp.id())
                .build())
            .build());

        var exampleBackendAddressPool = new BackendAddressPool("exampleBackendAddressPool", BackendAddressPoolArgs.builder()        
            .loadbalancerId(exampleLoadBalancer.id())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_public_ip = azure.network.PublicIp("examplePublicIp",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    allocation_method="Static")
example_load_balancer = azure.lb.LoadBalancer("exampleLoadBalancer",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    frontend_ip_configurations=[azure.lb.LoadBalancerFrontendIpConfigurationArgs(
        name="PublicIPAddress",
        public_ip_address_id=example_public_ip.id,
    )])
example_backend_address_pool = azure.lb.BackendAddressPool("exampleBackendAddressPool", loadbalancer_id=example_load_balancer.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const examplePublicIp = new azure.network.PublicIp("examplePublicIp", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    allocationMethod: "Static",
});
const exampleLoadBalancer = new azure.lb.LoadBalancer("exampleLoadBalancer", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    frontendIpConfigurations: [{
        name: "PublicIPAddress",
        publicIpAddressId: examplePublicIp.id,
    }],
});
const exampleBackendAddressPool = new azure.lb.BackendAddressPool("exampleBackendAddressPool", {loadbalancerId: exampleLoadBalancer.id});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  examplePublicIp:
    type: azure:network:PublicIp
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      allocationMethod: Static
  exampleLoadBalancer:
    type: azure:lb:LoadBalancer
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      frontendIpConfigurations:
        - name: PublicIPAddress
          publicIpAddressId: ${examplePublicIp.id}
  exampleBackendAddressPool:
    type: azure:lb:BackendAddressPool
    properties:
      loadbalancerId: ${exampleLoadBalancer.id}

Create a BackendAddressPool Resource

new BackendAddressPool(name: string, args: BackendAddressPoolArgs, opts?: CustomResourceOptions);
@overload
def BackendAddressPool(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       loadbalancer_id: Optional[str] = None,
                       name: Optional[str] = None,
                       tunnel_interfaces: Optional[Sequence[BackendAddressPoolTunnelInterfaceArgs]] = None)
@overload
def BackendAddressPool(resource_name: str,
                       args: BackendAddressPoolArgs,
                       opts: Optional[ResourceOptions] = None)
func NewBackendAddressPool(ctx *Context, name string, args BackendAddressPoolArgs, opts ...ResourceOption) (*BackendAddressPool, error)
public BackendAddressPool(string name, BackendAddressPoolArgs args, CustomResourceOptions? opts = null)
public BackendAddressPool(String name, BackendAddressPoolArgs args)
public BackendAddressPool(String name, BackendAddressPoolArgs args, CustomResourceOptions options)
type: azure:lb:BackendAddressPool
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BackendAddressPoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args BackendAddressPoolArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BackendAddressPoolArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BackendAddressPoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BackendAddressPoolArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BackendAddressPool Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The BackendAddressPool resource accepts the following input properties:

LoadbalancerId string

The ID of the Load Balancer in which to create the Backend Address Pool.

Name string

Specifies the name of the Backend Address Pool.

TunnelInterfaces List<Pulumi.Azure.Lb.Inputs.BackendAddressPoolTunnelInterfaceArgs>

One or more tunnel_interface blocks as defined below.

LoadbalancerId string

The ID of the Load Balancer in which to create the Backend Address Pool.

Name string

Specifies the name of the Backend Address Pool.

TunnelInterfaces []BackendAddressPoolTunnelInterfaceArgs

One or more tunnel_interface blocks as defined below.

loadbalancerId String

The ID of the Load Balancer in which to create the Backend Address Pool.

name String

Specifies the name of the Backend Address Pool.

tunnelInterfaces List<BackendAddressPoolTunnelInterfaceArgs>

One or more tunnel_interface blocks as defined below.

loadbalancerId string

The ID of the Load Balancer in which to create the Backend Address Pool.

name string

Specifies the name of the Backend Address Pool.

tunnelInterfaces BackendAddressPoolTunnelInterfaceArgs[]

One or more tunnel_interface blocks as defined below.

loadbalancer_id str

The ID of the Load Balancer in which to create the Backend Address Pool.

name str

Specifies the name of the Backend Address Pool.

tunnel_interfaces Sequence[BackendAddressPoolTunnelInterfaceArgs]

One or more tunnel_interface blocks as defined below.

loadbalancerId String

The ID of the Load Balancer in which to create the Backend Address Pool.

name String

Specifies the name of the Backend Address Pool.

tunnelInterfaces List<Property Map>

One or more tunnel_interface blocks as defined below.

Outputs

All input properties are implicitly available as output properties. Additionally, the BackendAddressPool resource produces the following output properties:

BackendIpConfigurations List<string>

The Backend IP Configurations associated with this Backend Address Pool.

Id string

The provider-assigned unique ID for this managed resource.

InboundNatRules List<string>

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

LoadBalancingRules List<string>

The Load Balancing Rules associated with this Backend Address Pool.

OutboundRules List<string>

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

BackendIpConfigurations []string

The Backend IP Configurations associated with this Backend Address Pool.

Id string

The provider-assigned unique ID for this managed resource.

InboundNatRules []string

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

LoadBalancingRules []string

The Load Balancing Rules associated with this Backend Address Pool.

OutboundRules []string

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

backendIpConfigurations List<String>

The Backend IP Configurations associated with this Backend Address Pool.

id String

The provider-assigned unique ID for this managed resource.

inboundNatRules List<String>

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

loadBalancingRules List<String>

The Load Balancing Rules associated with this Backend Address Pool.

outboundRules List<String>

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

backendIpConfigurations string[]

The Backend IP Configurations associated with this Backend Address Pool.

id string

The provider-assigned unique ID for this managed resource.

inboundNatRules string[]

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

loadBalancingRules string[]

The Load Balancing Rules associated with this Backend Address Pool.

outboundRules string[]

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

backend_ip_configurations Sequence[str]

The Backend IP Configurations associated with this Backend Address Pool.

id str

The provider-assigned unique ID for this managed resource.

inbound_nat_rules Sequence[str]

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

load_balancing_rules Sequence[str]

The Load Balancing Rules associated with this Backend Address Pool.

outbound_rules Sequence[str]

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

backendIpConfigurations List<String>

The Backend IP Configurations associated with this Backend Address Pool.

id String

The provider-assigned unique ID for this managed resource.

inboundNatRules List<String>

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

loadBalancingRules List<String>

The Load Balancing Rules associated with this Backend Address Pool.

outboundRules List<String>

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

Look up an Existing BackendAddressPool Resource

Get an existing BackendAddressPool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BackendAddressPoolState, opts?: CustomResourceOptions): BackendAddressPool
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backend_ip_configurations: Optional[Sequence[str]] = None,
        inbound_nat_rules: Optional[Sequence[str]] = None,
        load_balancing_rules: Optional[Sequence[str]] = None,
        loadbalancer_id: Optional[str] = None,
        name: Optional[str] = None,
        outbound_rules: Optional[Sequence[str]] = None,
        tunnel_interfaces: Optional[Sequence[BackendAddressPoolTunnelInterfaceArgs]] = None) -> BackendAddressPool
func GetBackendAddressPool(ctx *Context, name string, id IDInput, state *BackendAddressPoolState, opts ...ResourceOption) (*BackendAddressPool, error)
public static BackendAddressPool Get(string name, Input<string> id, BackendAddressPoolState? state, CustomResourceOptions? opts = null)
public static BackendAddressPool get(String name, Output<String> id, BackendAddressPoolState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
BackendIpConfigurations List<string>

The Backend IP Configurations associated with this Backend Address Pool.

InboundNatRules List<string>

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

LoadBalancingRules List<string>

The Load Balancing Rules associated with this Backend Address Pool.

LoadbalancerId string

The ID of the Load Balancer in which to create the Backend Address Pool.

Name string

Specifies the name of the Backend Address Pool.

OutboundRules List<string>

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

TunnelInterfaces List<Pulumi.Azure.Lb.Inputs.BackendAddressPoolTunnelInterfaceArgs>

One or more tunnel_interface blocks as defined below.

BackendIpConfigurations []string

The Backend IP Configurations associated with this Backend Address Pool.

InboundNatRules []string

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

LoadBalancingRules []string

The Load Balancing Rules associated with this Backend Address Pool.

LoadbalancerId string

The ID of the Load Balancer in which to create the Backend Address Pool.

Name string

Specifies the name of the Backend Address Pool.

OutboundRules []string

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

TunnelInterfaces []BackendAddressPoolTunnelInterfaceArgs

One or more tunnel_interface blocks as defined below.

backendIpConfigurations List<String>

The Backend IP Configurations associated with this Backend Address Pool.

inboundNatRules List<String>

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

loadBalancingRules List<String>

The Load Balancing Rules associated with this Backend Address Pool.

loadbalancerId String

The ID of the Load Balancer in which to create the Backend Address Pool.

name String

Specifies the name of the Backend Address Pool.

outboundRules List<String>

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

tunnelInterfaces List<BackendAddressPoolTunnelInterfaceArgs>

One or more tunnel_interface blocks as defined below.

backendIpConfigurations string[]

The Backend IP Configurations associated with this Backend Address Pool.

inboundNatRules string[]

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

loadBalancingRules string[]

The Load Balancing Rules associated with this Backend Address Pool.

loadbalancerId string

The ID of the Load Balancer in which to create the Backend Address Pool.

name string

Specifies the name of the Backend Address Pool.

outboundRules string[]

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

tunnelInterfaces BackendAddressPoolTunnelInterfaceArgs[]

One or more tunnel_interface blocks as defined below.

backend_ip_configurations Sequence[str]

The Backend IP Configurations associated with this Backend Address Pool.

inbound_nat_rules Sequence[str]

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

load_balancing_rules Sequence[str]

The Load Balancing Rules associated with this Backend Address Pool.

loadbalancer_id str

The ID of the Load Balancer in which to create the Backend Address Pool.

name str

Specifies the name of the Backend Address Pool.

outbound_rules Sequence[str]

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

tunnel_interfaces Sequence[BackendAddressPoolTunnelInterfaceArgs]

One or more tunnel_interface blocks as defined below.

backendIpConfigurations List<String>

The Backend IP Configurations associated with this Backend Address Pool.

inboundNatRules List<String>

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

loadBalancingRules List<String>

The Load Balancing Rules associated with this Backend Address Pool.

loadbalancerId String

The ID of the Load Balancer in which to create the Backend Address Pool.

name String

Specifies the name of the Backend Address Pool.

outboundRules List<String>

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

tunnelInterfaces List<Property Map>

One or more tunnel_interface blocks as defined below.

Supporting Types

BackendAddressPoolTunnelInterface

Identifier int

The unique identifier of this Gateway Lodbalancer Tunnel Interface.

Port int

The port number that this Gateway Lodbalancer Tunnel Interface listens to.

Protocol string

The protocol used for this Gateway Lodbalancer Tunnel Interface. Possible values are Native and VXLAN.

Type string

The traffic type of this Gateway Lodbalancer Tunnel Interface. Possible values are Internal and External.

Identifier int

The unique identifier of this Gateway Lodbalancer Tunnel Interface.

Port int

The port number that this Gateway Lodbalancer Tunnel Interface listens to.

Protocol string

The protocol used for this Gateway Lodbalancer Tunnel Interface. Possible values are Native and VXLAN.

Type string

The traffic type of this Gateway Lodbalancer Tunnel Interface. Possible values are Internal and External.

identifier Integer

The unique identifier of this Gateway Lodbalancer Tunnel Interface.

port Integer

The port number that this Gateway Lodbalancer Tunnel Interface listens to.

protocol String

The protocol used for this Gateway Lodbalancer Tunnel Interface. Possible values are Native and VXLAN.

type String

The traffic type of this Gateway Lodbalancer Tunnel Interface. Possible values are Internal and External.

identifier number

The unique identifier of this Gateway Lodbalancer Tunnel Interface.

port number

The port number that this Gateway Lodbalancer Tunnel Interface listens to.

protocol string

The protocol used for this Gateway Lodbalancer Tunnel Interface. Possible values are Native and VXLAN.

type string

The traffic type of this Gateway Lodbalancer Tunnel Interface. Possible values are Internal and External.

identifier int

The unique identifier of this Gateway Lodbalancer Tunnel Interface.

port int

The port number that this Gateway Lodbalancer Tunnel Interface listens to.

protocol str

The protocol used for this Gateway Lodbalancer Tunnel Interface. Possible values are Native and VXLAN.

type str

The traffic type of this Gateway Lodbalancer Tunnel Interface. Possible values are Internal and External.

identifier Number

The unique identifier of this Gateway Lodbalancer Tunnel Interface.

port Number

The port number that this Gateway Lodbalancer Tunnel Interface listens to.

protocol String

The protocol used for this Gateway Lodbalancer Tunnel Interface. Possible values are Native and VXLAN.

type String

The traffic type of this Gateway Lodbalancer Tunnel Interface. Possible values are Internal and External.

Import

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

 $ pulumi import azure:lb/backendAddressPool:BackendAddressPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/pool1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.