GetLB
Use this data source to access information about an existing Load Balancer
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Lb.GetLB.InvokeAsync(new Azure.Lb.GetLBArgs
{
Name = "example-lb",
ResourceGroupName = "example-resources",
}));
this.LoadbalancerId = example.Apply(example => example.Id);
}
[Output("loadbalancerId")]
public Output<string> LoadbalancerId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/lb"
"github.com/pulumi/pulumi/sdk/v2/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
}
ctx.Export("loadbalancerId", example.Id)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.lb.get_lb(name="example-lb",
resource_group_name="example-resources")
pulumi.export("loadbalancerId", example.id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.lb.getLB({
name: "example-lb",
resourceGroupName: "example-resources",
});
export const loadbalancerId = example.then(example => example.id);Using GetLB
function getLB(args: GetLBArgs, opts?: InvokeOptions): Promise<GetLBResult>function get_lb(name=None, resource_group_name=None, opts=None)func GetLB(ctx *Context, args *GetLBArgs, opts ...InvokeOption) (*GetLBResult, error)public static class GetLB {
public static Task<GetLBResult> InvokeAsync(GetLBArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
Specifies the name of the Load Balancer.
- Resource
Group stringName The name of the Resource Group in which the Load Balancer exists.
- Name string
Specifies the name of the Load Balancer.
- Resource
Group stringName The name of the Resource Group in which the Load Balancer exists.
- name string
Specifies the name of the Load Balancer.
- resource
Group stringName The name of the Resource Group in which the Load Balancer exists.
- name str
Specifies the name of the Load Balancer.
- resource_
group_ strname The name of the Resource Group in which the Load Balancer exists.
GetLB Result
The following output properties are available:
- Frontend
Ip List<GetConfigurations LBFrontend Ip Configuration> (Optional) A
frontend_ip_configurationblock as documented below.- Id string
The provider-assigned unique ID for this managed resource.
- Location string
The Azure location where the Load Balancer exists.
- Name string
The name of the Frontend IP Configuration.
- Private
Ip stringAddress Private IP Address to assign to the Load Balancer.
- Private
Ip List<string>Addresses The list of private IP address assigned to the load balancer in
frontend_ip_configurationblocks, if any.- Resource
Group stringName - Sku string
The SKU of the Load Balancer.
- Dictionary<string, string>
A mapping of tags assigned to the resource.
- Frontend
Ip []GetConfigurations LBFrontend Ip Configuration (Optional) A
frontend_ip_configurationblock as documented below.- Id string
The provider-assigned unique ID for this managed resource.
- Location string
The Azure location where the Load Balancer exists.
- Name string
The name of the Frontend IP Configuration.
- Private
Ip stringAddress Private IP Address to assign to the Load Balancer.
- Private
Ip []stringAddresses The list of private IP address assigned to the load balancer in
frontend_ip_configurationblocks, if any.- Resource
Group stringName - Sku string
The SKU of the Load Balancer.
- map[string]string
A mapping of tags assigned to the resource.
- frontend
Ip GetConfigurations LBFrontend Ip Configuration[] (Optional) A
frontend_ip_configurationblock as documented below.- id string
The provider-assigned unique ID for this managed resource.
- location string
The Azure location where the Load Balancer exists.
- name string
The name of the Frontend IP Configuration.
- private
Ip stringAddress Private IP Address to assign to the Load Balancer.
- private
Ip string[]Addresses The list of private IP address assigned to the load balancer in
frontend_ip_configurationblocks, if any.- resource
Group stringName - sku string
The SKU of the Load Balancer.
- {[key: string]: string}
A mapping of tags assigned to the resource.
- frontend_
ip_ List[Getconfigurations LBFrontend Ip Configuration] (Optional) A
frontend_ip_configurationblock as documented below.- id str
The provider-assigned unique ID for this managed resource.
- location str
The Azure location where the Load Balancer exists.
- name str
The name of the Frontend IP Configuration.
- private_
ip_ straddress Private IP Address to assign to the Load Balancer.
- private_
ip_ List[str]addresses The list of private IP address assigned to the load balancer in
frontend_ip_configurationblocks, if any.- resource_
group_ strname - sku str
The SKU of the Load Balancer.
- Dict[str, str]
A mapping of tags assigned to the resource.
Supporting Types
GetLBFrontendIpConfiguration
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Id string
The id of the Frontend IP Configuration.
- Name string
Specifies the name of the Load Balancer.
- Private
Ip stringAddress Private IP Address to assign to the Load Balancer.
- Private
Ip stringAddress Allocation The allocation method for the Private IP Address used by this Load Balancer.
- Private
Ip stringAddress Version The Private IP Address Version, either
IPv4orIPv6.- Public
Ip stringAddress Id The ID of a Public IP Address which is associated with this Load Balancer.
- Subnet
Id string The ID of the Subnet which is associated with the IP Configuration.
- Zones List<string>
A list of Availability Zones which the Load Balancer’s IP Addresses should be created in.
- Id string
The id of the Frontend IP Configuration.
- Name string
Specifies the name of the Load Balancer.
- Private
Ip stringAddress Private IP Address to assign to the Load Balancer.
- Private
Ip stringAddress Allocation The allocation method for the Private IP Address used by this Load Balancer.
- Private
Ip stringAddress Version The Private IP Address Version, either
IPv4orIPv6.- Public
Ip stringAddress Id The ID of a Public IP Address which is associated with this Load Balancer.
- Subnet
Id string The ID of the Subnet which is associated with the IP Configuration.
- Zones []string
A list of Availability Zones which the Load Balancer’s IP Addresses should be created in.
- id string
The id of the Frontend IP Configuration.
- name string
Specifies the name of the Load Balancer.
- private
Ip stringAddress Private IP Address to assign to the Load Balancer.
- private
Ip stringAddress Allocation The allocation method for the Private IP Address used by this Load Balancer.
- private
Ip stringAddress Version The Private IP Address Version, either
IPv4orIPv6.- public
Ip stringAddress Id The ID of a Public IP Address which is associated with this Load Balancer.
- subnet
Id string The ID of the Subnet which is associated with the IP Configuration.
- zones string[]
A list of Availability Zones which the Load Balancer’s IP Addresses should be created in.
- id str
The id of the Frontend IP Configuration.
- name str
Specifies the name of the Load Balancer.
- private
Ip strAddress Allocation The allocation method for the Private IP Address used by this Load Balancer.
- private
Ip strAddress Version The Private IP Address Version, either
IPv4orIPv6.- private_
ip_ straddress Private IP Address to assign to the Load Balancer.
- public_
ip_ straddress_ id The ID of a Public IP Address which is associated with this Load Balancer.
- subnet_
id str The ID of the Subnet which is associated with the IP Configuration.
- zones List[str]
A list of Availability Zones which the Load Balancer’s IP Addresses should be created in.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.