1. Packages
  2. Openstack Provider
  3. API Docs
  4. loadbalancer
  5. getLoadbalancerV2
OpenStack v5.4.0 published on Wednesday, Nov 12, 2025 by Pulumi
openstack logo
OpenStack v5.4.0 published on Wednesday, Nov 12, 2025 by Pulumi

    Use this data source to get the ID of an OpenStack Load Balancer.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const loadbalancer1 = openstack.loadbalancer.getLoadbalancerV2({
        name: "loadbalancer_1",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    loadbalancer1 = openstack.loadbalancer.get_loadbalancer_v2(name="loadbalancer_1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/loadbalancer"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := loadbalancer.GetLoadbalancerV2(ctx, &loadbalancer.GetLoadbalancerV2Args{
    			Name: pulumi.StringRef("loadbalancer_1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var loadbalancer1 = OpenStack.LoadBalancer.GetLoadbalancerV2.Invoke(new()
        {
            Name = "loadbalancer_1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.loadbalancer.LoadbalancerFunctions;
    import com.pulumi.openstack.loadbalancer.inputs.GetLoadbalancerV2Args;
    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 loadbalancer1 = LoadbalancerFunctions.getLoadbalancerV2(GetLoadbalancerV2Args.builder()
                .name("loadbalancer_1")
                .build());
    
        }
    }
    
    variables:
      loadbalancer1:
        fn::invoke:
          function: openstack:loadbalancer:getLoadbalancerV2
          arguments:
            name: loadbalancer_1
    

    Using getLoadbalancerV2

    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 getLoadbalancerV2(args: GetLoadbalancerV2Args, opts?: InvokeOptions): Promise<GetLoadbalancerV2Result>
    function getLoadbalancerV2Output(args: GetLoadbalancerV2OutputArgs, opts?: InvokeOptions): Output<GetLoadbalancerV2Result>
    def get_loadbalancer_v2(description: Optional[str] = None,
                            loadbalancer_id: Optional[str] = None,
                            name: Optional[str] = None,
                            region: Optional[str] = None,
                            tags: Optional[Sequence[str]] = None,
                            tags_anies: Optional[Sequence[str]] = None,
                            tags_not_anies: Optional[Sequence[str]] = None,
                            tags_nots: Optional[Sequence[str]] = None,
                            vip_address: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetLoadbalancerV2Result
    def get_loadbalancer_v2_output(description: Optional[pulumi.Input[str]] = None,
                            loadbalancer_id: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            region: Optional[pulumi.Input[str]] = None,
                            tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            tags_anies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            tags_not_anies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            tags_nots: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            vip_address: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetLoadbalancerV2Result]
    func GetLoadbalancerV2(ctx *Context, args *GetLoadbalancerV2Args, opts ...InvokeOption) (*GetLoadbalancerV2Result, error)
    func GetLoadbalancerV2Output(ctx *Context, args *GetLoadbalancerV2OutputArgs, opts ...InvokeOption) GetLoadbalancerV2ResultOutput

    > Note: This function is named GetLoadbalancerV2 in the Go SDK.

    public static class GetLoadbalancerV2 
    {
        public static Task<GetLoadbalancerV2Result> InvokeAsync(GetLoadbalancerV2Args args, InvokeOptions? opts = null)
        public static Output<GetLoadbalancerV2Result> Invoke(GetLoadbalancerV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLoadbalancerV2Result> getLoadbalancerV2(GetLoadbalancerV2Args args, InvokeOptions options)
    public static Output<GetLoadbalancerV2Result> getLoadbalancerV2(GetLoadbalancerV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: openstack:loadbalancer/getLoadbalancerV2:getLoadbalancerV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    The human-readable description for the loadbalancer.
    LoadbalancerId string
    The ID of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    Name string
    The name of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    Region string
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    Tags List<string>
    A set of tags applied to the loadbalancer. The load balancer will be returned if it has all of the specified tags.
    TagsAnies List<string>
    A set of tags. The load balancer will be returned if it has at least one of the specified tags.
    TagsNotAnies List<string>
    A set of tags. The load balancer will be returned if it does not have any of the specified tags.
    TagsNots List<string>
    A set of tags. The load balancer will be returned if it does not have all of the specified tags.
    VipAddress string
    The IP address of the loadbalancer's virtual IP (VIP).
    Description string
    The human-readable description for the loadbalancer.
    LoadbalancerId string
    The ID of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    Name string
    The name of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    Region string
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    Tags []string
    A set of tags applied to the loadbalancer. The load balancer will be returned if it has all of the specified tags.
    TagsAnies []string
    A set of tags. The load balancer will be returned if it has at least one of the specified tags.
    TagsNotAnies []string
    A set of tags. The load balancer will be returned if it does not have any of the specified tags.
    TagsNots []string
    A set of tags. The load balancer will be returned if it does not have all of the specified tags.
    VipAddress string
    The IP address of the loadbalancer's virtual IP (VIP).
    description String
    The human-readable description for the loadbalancer.
    loadbalancerId String
    The ID of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    name String
    The name of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    region String
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    tags List<String>
    A set of tags applied to the loadbalancer. The load balancer will be returned if it has all of the specified tags.
    tagsAnies List<String>
    A set of tags. The load balancer will be returned if it has at least one of the specified tags.
    tagsNotAnies List<String>
    A set of tags. The load balancer will be returned if it does not have any of the specified tags.
    tagsNots List<String>
    A set of tags. The load balancer will be returned if it does not have all of the specified tags.
    vipAddress String
    The IP address of the loadbalancer's virtual IP (VIP).
    description string
    The human-readable description for the loadbalancer.
    loadbalancerId string
    The ID of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    name string
    The name of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    region string
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    tags string[]
    A set of tags applied to the loadbalancer. The load balancer will be returned if it has all of the specified tags.
    tagsAnies string[]
    A set of tags. The load balancer will be returned if it has at least one of the specified tags.
    tagsNotAnies string[]
    A set of tags. The load balancer will be returned if it does not have any of the specified tags.
    tagsNots string[]
    A set of tags. The load balancer will be returned if it does not have all of the specified tags.
    vipAddress string
    The IP address of the loadbalancer's virtual IP (VIP).
    description str
    The human-readable description for the loadbalancer.
    loadbalancer_id str
    The ID of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    name str
    The name of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    region str
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    tags Sequence[str]
    A set of tags applied to the loadbalancer. The load balancer will be returned if it has all of the specified tags.
    tags_anies Sequence[str]
    A set of tags. The load balancer will be returned if it has at least one of the specified tags.
    tags_not_anies Sequence[str]
    A set of tags. The load balancer will be returned if it does not have any of the specified tags.
    tags_nots Sequence[str]
    A set of tags. The load balancer will be returned if it does not have all of the specified tags.
    vip_address str
    The IP address of the loadbalancer's virtual IP (VIP).
    description String
    The human-readable description for the loadbalancer.
    loadbalancerId String
    The ID of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    name String
    The name of the loadbalancer. Exactly one of name, loadbalancer_id is required to be set.
    region String
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    tags List<String>
    A set of tags applied to the loadbalancer. The load balancer will be returned if it has all of the specified tags.
    tagsAnies List<String>
    A set of tags. The load balancer will be returned if it has at least one of the specified tags.
    tagsNotAnies List<String>
    A set of tags. The load balancer will be returned if it does not have any of the specified tags.
    tagsNots List<String>
    A set of tags. The load balancer will be returned if it does not have all of the specified tags.
    vipAddress String
    The IP address of the loadbalancer's virtual IP (VIP).

    getLoadbalancerV2 Result

    The following output properties are available:

    AdditionalVips List<string>
    A list of additional VIP IP addresses associated with the loadbalancer.
    AdminStateUp bool
    The administrative state of the loadbalancer (true/false).
    AvailabilityZone string
    The availability zone of the loadbalancer.
    Description string
    The description of the loadbalancer.
    FlavorId string
    The flavor ID used by the loadbalancer.
    Id string
    The provider-assigned unique ID for this managed resource.
    Listeners List<Pulumi.OpenStack.LoadBalancer.Outputs.GetLoadbalancerV2Listener>
    A list of listener IDs (UUIDs) associated with the loadbalancer.
    LoadbalancerId string
    LoadbalancerProvider string
    The loadbalancer driver/provider used by Octavia (for example, amphora).
    Name string
    The name of the loadbalancer.
    OperatingStatus string
    The operating status of the loadbalancer.
    Pools List<Pulumi.OpenStack.LoadBalancer.Outputs.GetLoadbalancerV2Pool>
    A list of pool IDs (UUIDs) associated with the loadbalancer.
    ProjectId string
    The owner (project/tenant) ID of the loadbalancer.
    ProvisioningStatus string
    The provisioning status of the loadbalancer.
    Region string
    Tags List<string>
    A set of tags applied to the loadbalancer.
    VipAddress string
    The IP address of the loadbalancer’s virtual IP (VIP).
    VipNetworkId string
    The network ID associated with the VIP.
    VipPortId string
    The port ID associated with the VIP.
    VipQosPolicyId string
    The QoS policy ID associated with the VIP, if any.
    VipSubnetId string
    The subnet ID associated with the VIP.
    TagsAnies List<string>
    TagsNotAnies List<string>
    TagsNots List<string>
    AdditionalVips []string
    A list of additional VIP IP addresses associated with the loadbalancer.
    AdminStateUp bool
    The administrative state of the loadbalancer (true/false).
    AvailabilityZone string
    The availability zone of the loadbalancer.
    Description string
    The description of the loadbalancer.
    FlavorId string
    The flavor ID used by the loadbalancer.
    Id string
    The provider-assigned unique ID for this managed resource.
    Listeners []GetLoadbalancerV2Listener
    A list of listener IDs (UUIDs) associated with the loadbalancer.
    LoadbalancerId string
    LoadbalancerProvider string
    The loadbalancer driver/provider used by Octavia (for example, amphora).
    Name string
    The name of the loadbalancer.
    OperatingStatus string
    The operating status of the loadbalancer.
    Pools []GetLoadbalancerV2Pool
    A list of pool IDs (UUIDs) associated with the loadbalancer.
    ProjectId string
    The owner (project/tenant) ID of the loadbalancer.
    ProvisioningStatus string
    The provisioning status of the loadbalancer.
    Region string
    Tags []string
    A set of tags applied to the loadbalancer.
    VipAddress string
    The IP address of the loadbalancer’s virtual IP (VIP).
    VipNetworkId string
    The network ID associated with the VIP.
    VipPortId string
    The port ID associated with the VIP.
    VipQosPolicyId string
    The QoS policy ID associated with the VIP, if any.
    VipSubnetId string
    The subnet ID associated with the VIP.
    TagsAnies []string
    TagsNotAnies []string
    TagsNots []string
    additionalVips List<String>
    A list of additional VIP IP addresses associated with the loadbalancer.
    adminStateUp Boolean
    The administrative state of the loadbalancer (true/false).
    availabilityZone String
    The availability zone of the loadbalancer.
    description String
    The description of the loadbalancer.
    flavorId String
    The flavor ID used by the loadbalancer.
    id String
    The provider-assigned unique ID for this managed resource.
    listeners List<GetLoadbalancerV2Listener>
    A list of listener IDs (UUIDs) associated with the loadbalancer.
    loadbalancerId String
    loadbalancerProvider String
    The loadbalancer driver/provider used by Octavia (for example, amphora).
    name String
    The name of the loadbalancer.
    operatingStatus String
    The operating status of the loadbalancer.
    pools List<GetLoadbalancerV2Pool>
    A list of pool IDs (UUIDs) associated with the loadbalancer.
    projectId String
    The owner (project/tenant) ID of the loadbalancer.
    provisioningStatus String
    The provisioning status of the loadbalancer.
    region String
    tags List<String>
    A set of tags applied to the loadbalancer.
    vipAddress String
    The IP address of the loadbalancer’s virtual IP (VIP).
    vipNetworkId String
    The network ID associated with the VIP.
    vipPortId String
    The port ID associated with the VIP.
    vipQosPolicyId String
    The QoS policy ID associated with the VIP, if any.
    vipSubnetId String
    The subnet ID associated with the VIP.
    tagsAnies List<String>
    tagsNotAnies List<String>
    tagsNots List<String>
    additionalVips string[]
    A list of additional VIP IP addresses associated with the loadbalancer.
    adminStateUp boolean
    The administrative state of the loadbalancer (true/false).
    availabilityZone string
    The availability zone of the loadbalancer.
    description string
    The description of the loadbalancer.
    flavorId string
    The flavor ID used by the loadbalancer.
    id string
    The provider-assigned unique ID for this managed resource.
    listeners GetLoadbalancerV2Listener[]
    A list of listener IDs (UUIDs) associated with the loadbalancer.
    loadbalancerId string
    loadbalancerProvider string
    The loadbalancer driver/provider used by Octavia (for example, amphora).
    name string
    The name of the loadbalancer.
    operatingStatus string
    The operating status of the loadbalancer.
    pools GetLoadbalancerV2Pool[]
    A list of pool IDs (UUIDs) associated with the loadbalancer.
    projectId string
    The owner (project/tenant) ID of the loadbalancer.
    provisioningStatus string
    The provisioning status of the loadbalancer.
    region string
    tags string[]
    A set of tags applied to the loadbalancer.
    vipAddress string
    The IP address of the loadbalancer’s virtual IP (VIP).
    vipNetworkId string
    The network ID associated with the VIP.
    vipPortId string
    The port ID associated with the VIP.
    vipQosPolicyId string
    The QoS policy ID associated with the VIP, if any.
    vipSubnetId string
    The subnet ID associated with the VIP.
    tagsAnies string[]
    tagsNotAnies string[]
    tagsNots string[]
    additional_vips Sequence[str]
    A list of additional VIP IP addresses associated with the loadbalancer.
    admin_state_up bool
    The administrative state of the loadbalancer (true/false).
    availability_zone str
    The availability zone of the loadbalancer.
    description str
    The description of the loadbalancer.
    flavor_id str
    The flavor ID used by the loadbalancer.
    id str
    The provider-assigned unique ID for this managed resource.
    listeners Sequence[GetLoadbalancerV2Listener]
    A list of listener IDs (UUIDs) associated with the loadbalancer.
    loadbalancer_id str
    loadbalancer_provider str
    The loadbalancer driver/provider used by Octavia (for example, amphora).
    name str
    The name of the loadbalancer.
    operating_status str
    The operating status of the loadbalancer.
    pools Sequence[GetLoadbalancerV2Pool]
    A list of pool IDs (UUIDs) associated with the loadbalancer.
    project_id str
    The owner (project/tenant) ID of the loadbalancer.
    provisioning_status str
    The provisioning status of the loadbalancer.
    region str
    tags Sequence[str]
    A set of tags applied to the loadbalancer.
    vip_address str
    The IP address of the loadbalancer’s virtual IP (VIP).
    vip_network_id str
    The network ID associated with the VIP.
    vip_port_id str
    The port ID associated with the VIP.
    vip_qos_policy_id str
    The QoS policy ID associated with the VIP, if any.
    vip_subnet_id str
    The subnet ID associated with the VIP.
    tags_anies Sequence[str]
    tags_not_anies Sequence[str]
    tags_nots Sequence[str]
    additionalVips List<String>
    A list of additional VIP IP addresses associated with the loadbalancer.
    adminStateUp Boolean
    The administrative state of the loadbalancer (true/false).
    availabilityZone String
    The availability zone of the loadbalancer.
    description String
    The description of the loadbalancer.
    flavorId String
    The flavor ID used by the loadbalancer.
    id String
    The provider-assigned unique ID for this managed resource.
    listeners List<Property Map>
    A list of listener IDs (UUIDs) associated with the loadbalancer.
    loadbalancerId String
    loadbalancerProvider String
    The loadbalancer driver/provider used by Octavia (for example, amphora).
    name String
    The name of the loadbalancer.
    operatingStatus String
    The operating status of the loadbalancer.
    pools List<Property Map>
    A list of pool IDs (UUIDs) associated with the loadbalancer.
    projectId String
    The owner (project/tenant) ID of the loadbalancer.
    provisioningStatus String
    The provisioning status of the loadbalancer.
    region String
    tags List<String>
    A set of tags applied to the loadbalancer.
    vipAddress String
    The IP address of the loadbalancer’s virtual IP (VIP).
    vipNetworkId String
    The network ID associated with the VIP.
    vipPortId String
    The port ID associated with the VIP.
    vipQosPolicyId String
    The QoS policy ID associated with the VIP, if any.
    vipSubnetId String
    The subnet ID associated with the VIP.
    tagsAnies List<String>
    tagsNotAnies List<String>
    tagsNots List<String>

    Supporting Types

    GetLoadbalancerV2Listener

    Id string
    Id string
    id String
    id string
    id str
    id String

    GetLoadbalancerV2Pool

    Id string
    Id string
    id String
    id string
    id str
    id String

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v5.4.0 published on Wednesday, Nov 12, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate