We recommend using Azure Native.
azure.lb.getBackendAddressPool
Explore with Pulumi AI
Use this data source to access information about an existing Load Balancer’s Backend Address Pool.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleLB = Azure.Lb.GetLB.Invoke(new()
{
Name = "example-lb",
ResourceGroupName = "example-resources",
});
var exampleBackendAddressPool = Azure.Lb.GetBackendAddressPool.Invoke(new()
{
Name = "first",
LoadbalancerId = exampleLB.Apply(getLBResult => getLBResult.Id),
});
return new Dictionary<string, object?>
{
["backendAddressPoolId"] = exampleBackendAddressPool.Apply(getBackendAddressPoolResult => getBackendAddressPoolResult.Id),
["backendIpConfigurationIds"] = data.Azurerm_lb_backend_address_pool.Beap.Backend_ip_configurations.Select(__item => __item.Id).ToList(),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/lb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleLB, err := lb.GetLB(ctx, &lb.GetLBArgs{
Name: "example-lb",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
exampleBackendAddressPool, err := lb.LookupBackendAddressPool(ctx, &lb.LookupBackendAddressPoolArgs{
Name: "first",
LoadbalancerId: exampleLB.Id,
}, nil)
if err != nil {
return err
}
ctx.Export("backendAddressPoolId", exampleBackendAddressPool.Id)
var splat0 []interface{}
for _, val0 := range data.Azurerm_lb_backend_address_pool.Beap.Backend_ip_configurations {
splat0 = append(splat0, val0.Id)
}
ctx.Export("backendIpConfigurationIds", splat0)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.lb.LbFunctions;
import com.pulumi.azure.lb.inputs.GetLBArgs;
import com.pulumi.azure.lb.inputs.GetBackendAddressPoolArgs;
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) {
final var exampleLB = LbFunctions.getLB(GetLBArgs.builder()
.name("example-lb")
.resourceGroupName("example-resources")
.build());
final var exampleBackendAddressPool = LbFunctions.getBackendAddressPool(GetBackendAddressPoolArgs.builder()
.name("first")
.loadbalancerId(exampleLB.applyValue(getLBResult -> getLBResult.id()))
.build());
ctx.export("backendAddressPoolId", exampleBackendAddressPool.applyValue(getBackendAddressPoolResult -> getBackendAddressPoolResult.id()));
ctx.export("backendIpConfigurationIds", data.azurerm_lb_backend_address_pool().beap().backend_ip_configurations().stream().map(element -> element.id()).collect(toList()));
}
}
import pulumi
import pulumi_azure as azure
example_lb = azure.lb.get_lb(name="example-lb",
resource_group_name="example-resources")
example_backend_address_pool = azure.lb.get_backend_address_pool(name="first",
loadbalancer_id=example_lb.id)
pulumi.export("backendAddressPoolId", example_backend_address_pool.id)
pulumi.export("backendIpConfigurationIds", [__item["id"] for __item in data["azurerm_lb_backend_address_pool"]["beap"]["backend_ip_configurations"]])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleLB = azure.lb.getLB({
name: "example-lb",
resourceGroupName: "example-resources",
});
const exampleBackendAddressPool = exampleLB.then(exampleLB => azure.lb.getBackendAddressPool({
name: "first",
loadbalancerId: exampleLB.id,
}));
export const backendAddressPoolId = exampleBackendAddressPool.then(exampleBackendAddressPool => exampleBackendAddressPool.id);
export const backendIpConfigurationIds = data.azurerm_lb_backend_address_pool.beap.backend_ip_configurations.map(__item => __item.id);
Coming soon!
Using getBackendAddressPool
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBackendAddressPool(args: GetBackendAddressPoolArgs, opts?: InvokeOptions): Promise<GetBackendAddressPoolResult>
function getBackendAddressPoolOutput(args: GetBackendAddressPoolOutputArgs, opts?: InvokeOptions): Output<GetBackendAddressPoolResult>
def get_backend_address_pool(loadbalancer_id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBackendAddressPoolResult
def get_backend_address_pool_output(loadbalancer_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBackendAddressPoolResult]
func LookupBackendAddressPool(ctx *Context, args *LookupBackendAddressPoolArgs, opts ...InvokeOption) (*LookupBackendAddressPoolResult, error)
func LookupBackendAddressPoolOutput(ctx *Context, args *LookupBackendAddressPoolOutputArgs, opts ...InvokeOption) LookupBackendAddressPoolResultOutput
> Note: This function is named LookupBackendAddressPool
in the Go SDK.
public static class GetBackendAddressPool
{
public static Task<GetBackendAddressPoolResult> InvokeAsync(GetBackendAddressPoolArgs args, InvokeOptions? opts = null)
public static Output<GetBackendAddressPoolResult> Invoke(GetBackendAddressPoolInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBackendAddressPoolResult> getBackendAddressPool(GetBackendAddressPoolArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:lb/getBackendAddressPool:getBackendAddressPool
arguments:
# arguments dictionary
The following arguments are supported:
- Loadbalancer
Id string The ID of the Load Balancer in which the Backend Address Pool exists.
- Name string
Specifies the name of the Backend Address Pool.
- Loadbalancer
Id string The ID of the Load Balancer in which the Backend Address Pool exists.
- Name string
Specifies the name of the Backend Address Pool.
- loadbalancer
Id String The ID of the Load Balancer in which the Backend Address Pool exists.
- name String
Specifies the name of the Backend Address Pool.
- loadbalancer
Id string The ID of the Load Balancer in which the Backend Address Pool exists.
- name string
Specifies the name of the Backend Address Pool.
- loadbalancer_
id str The ID of the Load Balancer in which the Backend Address Pool exists.
- name str
Specifies the name of the Backend Address Pool.
- loadbalancer
Id String The ID of the Load Balancer in which the Backend Address Pool exists.
- name String
Specifies the name of the Backend Address Pool.
getBackendAddressPool Result
The following output properties are available:
- Backend
Addresses List<Pulumi.Azure. Lb. Outputs. Get Backend Address Pool Backend Address> A list of
backend_address
block as defined below.- Backend
Ip List<Pulumi.Configurations Azure. Lb. Outputs. Get Backend Address Pool Backend Ip Configuration> A list of references to IP addresses defined in network interfaces.
- Id string
The provider-assigned unique ID for this managed resource.
- Inbound
Nat List<string>Rules A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
- Load
Balancing List<string>Rules A list of the Load Balancing Rules associated with this Backend Address Pool.
- Loadbalancer
Id string - Name string
The name of the Backend Address.
- Outbound
Rules List<string> A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
- Backend
Addresses []GetBackend Address Pool Backend Address A list of
backend_address
block as defined below.- Backend
Ip []GetConfigurations Backend Address Pool Backend Ip Configuration A list of references to IP addresses defined in network interfaces.
- Id string
The provider-assigned unique ID for this managed resource.
- Inbound
Nat []stringRules A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
- Load
Balancing []stringRules A list of the Load Balancing Rules associated with this Backend Address Pool.
- Loadbalancer
Id string - Name string
The name of the Backend Address.
- Outbound
Rules []string A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
- backend
Addresses List<GetBackend Address Pool Backend Address> A list of
backend_address
block as defined below.- backend
Ip List<GetConfigurations Backend Address Pool Backend Ip Configuration> A list of references to IP addresses defined in network interfaces.
- id String
The provider-assigned unique ID for this managed resource.
- inbound
Nat List<String>Rules A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
- load
Balancing List<String>Rules A list of the Load Balancing Rules associated with this Backend Address Pool.
- loadbalancer
Id String - name String
The name of the Backend Address.
- outbound
Rules List<String> A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
- backend
Addresses GetBackend Address Pool Backend Address[] A list of
backend_address
block as defined below.- backend
Ip GetConfigurations Backend Address Pool Backend Ip Configuration[] A list of references to IP addresses defined in network interfaces.
- id string
The provider-assigned unique ID for this managed resource.
- inbound
Nat string[]Rules A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
- load
Balancing string[]Rules A list of the Load Balancing Rules associated with this Backend Address Pool.
- loadbalancer
Id string - name string
The name of the Backend Address.
- outbound
Rules string[] A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
- backend_
addresses Sequence[GetBackend Address Pool Backend Address] A list of
backend_address
block as defined below.- backend_
ip_ Sequence[Getconfigurations Backend Address Pool Backend Ip Configuration] A list of references to IP addresses defined in network interfaces.
- id str
The provider-assigned unique ID for this managed resource.
- inbound_
nat_ Sequence[str]rules A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
- load_
balancing_ Sequence[str]rules A list of the Load Balancing Rules associated with this Backend Address Pool.
- loadbalancer_
id str - name str
The name of the Backend Address.
- outbound_
rules Sequence[str] A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
- backend
Addresses List<Property Map> A list of
backend_address
block as defined below.- backend
Ip List<Property Map>Configurations A list of references to IP addresses defined in network interfaces.
- id String
The provider-assigned unique ID for this managed resource.
- inbound
Nat List<String>Rules A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
- load
Balancing List<String>Rules A list of the Load Balancing Rules associated with this Backend Address Pool.
- loadbalancer
Id String - name String
The name of the Backend Address.
- outbound
Rules List<String> A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
Supporting Types
GetBackendAddressPoolBackendAddress
- Inbound
Nat List<Pulumi.Rule Port Mappings Azure. Lb. Inputs. Get Backend Address Pool Backend Address Inbound Nat Rule Port Mapping> A list of
inbound_nat_rule_port_mapping
block as defined below.- Ip
Address string The Static IP address for this Load Balancer within the Virtual Network.
- Name string
Specifies the name of the Backend Address Pool.
- Virtual
Network stringId The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
- Inbound
Nat []GetRule Port Mappings Backend Address Pool Backend Address Inbound Nat Rule Port Mapping A list of
inbound_nat_rule_port_mapping
block as defined below.- Ip
Address string The Static IP address for this Load Balancer within the Virtual Network.
- Name string
Specifies the name of the Backend Address Pool.
- Virtual
Network stringId The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
- inbound
Nat List<GetRule Port Mappings Backend Address Pool Backend Address Inbound Nat Rule Port Mapping> A list of
inbound_nat_rule_port_mapping
block as defined below.- ip
Address String The Static IP address for this Load Balancer within the Virtual Network.
- name String
Specifies the name of the Backend Address Pool.
- virtual
Network StringId The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
- inbound
Nat GetRule Port Mappings Backend Address Pool Backend Address Inbound Nat Rule Port Mapping[] A list of
inbound_nat_rule_port_mapping
block as defined below.- ip
Address string The Static IP address for this Load Balancer within the Virtual Network.
- name string
Specifies the name of the Backend Address Pool.
- virtual
Network stringId The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
- inbound_
nat_ Sequence[Getrule_ port_ mappings Backend Address Pool Backend Address Inbound Nat Rule Port Mapping] A list of
inbound_nat_rule_port_mapping
block as defined below.- ip_
address str The Static IP address for this Load Balancer within the Virtual Network.
- name str
Specifies the name of the Backend Address Pool.
- virtual_
network_ strid The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
- inbound
Nat List<Property Map>Rule Port Mappings A list of
inbound_nat_rule_port_mapping
block as defined below.- ip
Address String The Static IP address for this Load Balancer within the Virtual Network.
- name String
Specifies the name of the Backend Address Pool.
- virtual
Network StringId The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
GetBackendAddressPoolBackendAddressInboundNatRulePortMapping
- Backend
Port int The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- Frontend
Port int The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- Inbound
Nat stringRule Name The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- Backend
Port int The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- Frontend
Port int The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- Inbound
Nat stringRule Name The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- backend
Port Integer The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- frontend
Port Integer The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- inbound
Nat StringRule Name The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- backend
Port number The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- frontend
Port number The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- inbound
Nat stringRule Name The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- backend_
port int The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- frontend_
port int The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- inbound_
nat_ strrule_ name The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- backend
Port Number The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- frontend
Port Number The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
- inbound
Nat StringRule Name The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
GetBackendAddressPoolBackendIpConfiguration
- Id string
The ID of the Backend Address Pool.
- Id string
The ID of the Backend Address Pool.
- id String
The ID of the Backend Address Pool.
- id string
The ID of the Backend Address Pool.
- id str
The ID of the Backend Address Pool.
- id String
The ID of the Backend Address Pool.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.