getBackendAddressPool

Use this data source to access information about an existing Load Balancer's Backend Address Pool.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.lb.getLB({
name: "example-lb",
resourceGroupName: "example-resources",
});
const exampleGetBackendAddressPool = example.then(example => azure.lb.getBackendAddressPool({
name: "first",
loadbalancerId: example.id,
}));
export const backendAddressPoolId = exampleGetBackendAddressPool.then(exampleGetBackendAddressPool => exampleGetBackendAddressPool.id);
export const backendIpConfigurationIds = beap.backendIpConfigurations.map(__item => __item.id);
import pulumi
import pulumi_azure as azure
example = azure.lb.get_lb(name="example-lb",
resource_group_name="example-resources")
example_get_backend_address_pool = azure.lb.get_backend_address_pool(name="first",
loadbalancer_id=example.id)
pulumi.export("backendAddressPoolId", example_get_backend_address_pool.id)
pulumi.export("backendIpConfigurationIds", [__item["id"] for __item in beap["backendIpConfigurations"]])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Lb.GetLB.Invoke(new()
{
Name = "example-lb",
ResourceGroupName = "example-resources",
});
var exampleGetBackendAddressPool = Azure.Lb.GetBackendAddressPool.Invoke(new()
{
Name = "first",
LoadbalancerId = example.Apply(getLBResult => getLBResult.Id),
});
return new Dictionary<string, object?>
{
["backendAddressPoolId"] = exampleGetBackendAddressPool.Apply(getBackendAddressPoolResult => getBackendAddressPoolResult.Id),
["backendIpConfigurationIds"] = beap.BackendIpConfigurations.Select(__item => __item.Id).ToList(),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := lb.GetLB(ctx, &lb.GetLBArgs{
Name: "example-lb",
ResourceGroupName: "example-resources",
}, nil);
if err != nil {
return err
}
exampleGetBackendAddressPool, err := lb.LookupBackendAddressPool(ctx, &lb.LookupBackendAddressPoolArgs{
Name: "first",
LoadbalancerId: example.Id,
}, nil);
if err != nil {
return err
}
ctx.Export("backendAddressPoolId", exampleGetBackendAddressPool.Id)
ctx.Export("backendIpConfigurationIds", pulumi.Array(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:15,11-45)))
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 example = LbFunctions.getLB(GetLBArgs.builder()
.name("example-lb")
.resourceGroupName("example-resources")
.build());
final var exampleGetBackendAddressPool = LbFunctions.getBackendAddressPool(GetBackendAddressPoolArgs.builder()
.name("first")
.loadbalancerId(example.id())
.build());
ctx.export("backendAddressPoolId", exampleGetBackendAddressPool.id());
ctx.export("backendIpConfigurationIds", beap.backendIpConfigurations().stream().map(element -> element.id()).collect(toList()));
}
}

API Providers

This data source uses the following Azure API Providers:

  • Microsoft.Network: 2023-09-01

Return

A collection of values returned by getBackendAddressPool.

Parameters

argument

A collection of arguments for invoking getBackendAddressPool.


suspend fun getBackendAddressPool(loadbalancerId: String, name: String): GetBackendAddressPoolResult

Return

A collection of values returned by getBackendAddressPool.

Parameters

loadbalancerId

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

name

Specifies the name of the Backend Address Pool.

See also


Return

A collection of values returned by getBackendAddressPool.

Parameters

argument

Builder for com.pulumi.azure.lb.kotlin.inputs.GetBackendAddressPoolPlainArgs.

See also