1. Registry
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudLoadbalancer
Viewing docs for OVHCloud v2.21.0
published on Friday, Sep 25, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.21.0
published on Friday, Sep 25, 2026 by OVHcloud

    Use this data source to get information about a load balancer in a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const lb = ovh.getCloudLoadbalancer({
        serviceName: "<public cloud project ID>",
        id: "<load balancer ID>",
    });
    export const loadbalancerVip = lb.then(lb => lb.currentState?.network?.addresses);
    
    import pulumi
    import pulumi_ovh as ovh
    
    lb = ovh.get_cloud_loadbalancer(service_name="<public cloud project ID>",
        id="<load balancer ID>")
    pulumi.export("loadbalancerVip", lb.current_state.network.addresses)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		lb, err := ovh.LookupCloudLoadbalancer(ctx, &ovh.LookupCloudLoadbalancerArgs{
    			ServiceName: "<public cloud project ID>",
    			Id:          "<load balancer ID>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("loadbalancerVip", lb.CurrentState.Network.Addresses)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var lb = Ovh.GetCloudLoadbalancer.Invoke(new()
        {
            ServiceName = "<public cloud project ID>",
            Id = "<load balancer ID>",
        });
    
        return new Dictionary<string, object?>
        {
            ["loadbalancerVip"] = lb.Apply(getCloudLoadbalancerResult => getCloudLoadbalancerResult.CurrentState?.Network?.Addresses),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetCloudLoadbalancerArgs;
    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 lb = OvhFunctions.getCloudLoadbalancer(GetCloudLoadbalancerArgs.builder()
                .serviceName("<public cloud project ID>")
                .id("<load balancer ID>")
                .build());
    
            ctx.export("loadbalancerVip", lb.currentState().network().addresses());
        }
    }
    
    variables:
      lb:
        fn::invoke:
          function: ovh:getCloudLoadbalancer
          arguments:
            serviceName: <public cloud project ID>
            id: <load balancer ID>
    outputs:
      loadbalancerVip: ${lb.currentState.network.addresses}
    
    Example coming soon!
    

    Using getCloudLoadbalancer

    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 getCloudLoadbalancer(args: GetCloudLoadbalancerArgs, opts?: InvokeOptions): Promise<GetCloudLoadbalancerResult>
    function getCloudLoadbalancerOutput(args: GetCloudLoadbalancerOutputArgs, opts?: InvokeOutputOptions): Output<GetCloudLoadbalancerResult>
    def get_cloud_loadbalancer(id: Optional[str] = None,
                               service_name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetCloudLoadbalancerResult
    def get_cloud_loadbalancer_output(id: pulumi.Input[Optional[str]] = None,
                               service_name: pulumi.Input[Optional[str]] = None,
                               opts: Optional[InvokeOutputOptions] = None) -> Output[GetCloudLoadbalancerResult]
    func LookupCloudLoadbalancer(ctx *Context, args *LookupCloudLoadbalancerArgs, opts ...InvokeOption) (*LookupCloudLoadbalancerResult, error)
    func LookupCloudLoadbalancerOutput(ctx *Context, args *LookupCloudLoadbalancerOutputArgs, opts ...InvokeOption) LookupCloudLoadbalancerResultOutput

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

    public static class GetCloudLoadbalancer 
    {
        public static Task<GetCloudLoadbalancerResult> InvokeAsync(GetCloudLoadbalancerArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudLoadbalancerResult> Invoke(GetCloudLoadbalancerInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudLoadbalancerResult> Invoke(GetCloudLoadbalancerInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetCloudLoadbalancerResult> getCloudLoadbalancer(GetCloudLoadbalancerArgs args, InvokeOptions options)
    public static Output<GetCloudLoadbalancerResult> getCloudLoadbalancer(GetCloudLoadbalancerArgs args, InvokeOptions options)
    public static Output<GetCloudLoadbalancerResult> getCloudLoadbalancer(GetCloudLoadbalancerArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudLoadbalancer:getCloudLoadbalancer
      arguments:
        # arguments dictionary
    data "ovh_get_cloud_loadbalancer" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    ID of the load balancer.
    ServiceName string
    Service name of the resource representing the id of the cloud project.
    Id string
    ID of the load balancer.
    ServiceName string
    Service name of the resource representing the id of the cloud project.
    id string
    ID of the load balancer.
    service_name string
    Service name of the resource representing the id of the cloud project.
    id String
    ID of the load balancer.
    serviceName String
    Service name of the resource representing the id of the cloud project.
    id string
    ID of the load balancer.
    serviceName string
    Service name of the resource representing the id of the cloud project.
    id str
    ID of the load balancer.
    service_name str
    Service name of the resource representing the id of the cloud project.
    id String
    ID of the load balancer.
    serviceName String
    Service name of the resource representing the id of the cloud project.

    getCloudLoadbalancer Result

    The following output properties are available:

    AvailabilityZone string
    Availability zone.
    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the load balancer.
    CurrentState GetCloudLoadbalancerCurrentState
    Current state of the load balancer:
    Description string
    Load balancer description.
    FlavorName string
    Name of the load balancer flavor.
    Id string
    Flavor ID.
    Name string
    Load balancer name.
    Network GetCloudLoadbalancerNetwork
    VIP network:
    Region string
    Region.
    ResourceStatus string
    Load balancer readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ServiceName string
    UpdatedAt string
    Last update date of the load balancer.
    AvailabilityZone string
    Availability zone.
    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the load balancer.
    CurrentState GetCloudLoadbalancerCurrentState
    Current state of the load balancer:
    Description string
    Load balancer description.
    FlavorName string
    Name of the load balancer flavor.
    Id string
    Flavor ID.
    Name string
    Load balancer name.
    Network GetCloudLoadbalancerNetwork
    VIP network:
    Region string
    Region.
    ResourceStatus string
    Load balancer readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ServiceName string
    UpdatedAt string
    Last update date of the load balancer.
    availability_zone string
    Availability zone.
    checksum string
    Computed hash representing the current target specification value.
    created_at string
    Creation date of the load balancer.
    current_state object
    Current state of the load balancer:
    description string
    Load balancer description.
    flavor_name string
    Name of the load balancer flavor.
    id string
    Flavor ID.
    name string
    Load balancer name.
    network object
    VIP network:
    region string
    Region.
    resource_status string
    Load balancer readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    service_name string
    updated_at string
    Last update date of the load balancer.
    availabilityZone String
    Availability zone.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the load balancer.
    currentState GetCloudLoadbalancerCurrentState
    Current state of the load balancer:
    description String
    Load balancer description.
    flavorName String
    Name of the load balancer flavor.
    id String
    Flavor ID.
    name String
    Load balancer name.
    network GetCloudLoadbalancerNetwork
    VIP network:
    region String
    Region.
    resourceStatus String
    Load balancer readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName String
    updatedAt String
    Last update date of the load balancer.
    availabilityZone string
    Availability zone.
    checksum string
    Computed hash representing the current target specification value.
    createdAt string
    Creation date of the load balancer.
    currentState GetCloudLoadbalancerCurrentState
    Current state of the load balancer:
    description string
    Load balancer description.
    flavorName string
    Name of the load balancer flavor.
    id string
    Flavor ID.
    name string
    Load balancer name.
    network GetCloudLoadbalancerNetwork
    VIP network:
    region string
    Region.
    resourceStatus string
    Load balancer readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName string
    updatedAt string
    Last update date of the load balancer.
    availability_zone str
    Availability zone.
    checksum str
    Computed hash representing the current target specification value.
    created_at str
    Creation date of the load balancer.
    current_state GetCloudLoadbalancerCurrentState
    Current state of the load balancer:
    description str
    Load balancer description.
    flavor_name str
    Name of the load balancer flavor.
    id str
    Flavor ID.
    name str
    Load balancer name.
    network GetCloudLoadbalancerNetwork
    VIP network:
    region str
    Region.
    resource_status str
    Load balancer readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    service_name str
    updated_at str
    Last update date of the load balancer.
    availabilityZone String
    Availability zone.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the load balancer.
    currentState Property Map
    Current state of the load balancer:
    description String
    Load balancer description.
    flavorName String
    Name of the load balancer flavor.
    id String
    Flavor ID.
    name String
    Load balancer name.
    network Property Map
    VIP network:
    region String
    Region.
    resourceStatus String
    Load balancer readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName String
    updatedAt String
    Last update date of the load balancer.

    Supporting Types

    GetCloudLoadbalancerCurrentState

    AvailabilityZone string
    Availability zone.
    Description string
    Load balancer description.
    Flavor GetCloudLoadbalancerCurrentStateFlavor
    Load balancer flavor reference:
    Name string
    Load balancer name.
    Network GetCloudLoadbalancerCurrentStateNetwork
    VIP network:
    OperatingStatus string
    Operating status of the load balancer.
    ProvisioningStatus string
    Provisioning status of the load balancer.
    Region string
    Region.
    AvailabilityZone string
    Availability zone.
    Description string
    Load balancer description.
    Flavor GetCloudLoadbalancerCurrentStateFlavor
    Load balancer flavor reference:
    Name string
    Load balancer name.
    Network GetCloudLoadbalancerCurrentStateNetwork
    VIP network:
    OperatingStatus string
    Operating status of the load balancer.
    ProvisioningStatus string
    Provisioning status of the load balancer.
    Region string
    Region.
    availability_zone string
    Availability zone.
    description string
    Load balancer description.
    flavor object
    Load balancer flavor reference:
    name string
    Load balancer name.
    network object
    VIP network:
    operating_status string
    Operating status of the load balancer.
    provisioning_status string
    Provisioning status of the load balancer.
    region string
    Region.
    availabilityZone String
    Availability zone.
    description String
    Load balancer description.
    flavor GetCloudLoadbalancerCurrentStateFlavor
    Load balancer flavor reference:
    name String
    Load balancer name.
    network GetCloudLoadbalancerCurrentStateNetwork
    VIP network:
    operatingStatus String
    Operating status of the load balancer.
    provisioningStatus String
    Provisioning status of the load balancer.
    region String
    Region.
    availabilityZone string
    Availability zone.
    description string
    Load balancer description.
    flavor GetCloudLoadbalancerCurrentStateFlavor
    Load balancer flavor reference:
    name string
    Load balancer name.
    network GetCloudLoadbalancerCurrentStateNetwork
    VIP network:
    operatingStatus string
    Operating status of the load balancer.
    provisioningStatus string
    Provisioning status of the load balancer.
    region string
    Region.
    availability_zone str
    Availability zone.
    description str
    Load balancer description.
    flavor GetCloudLoadbalancerCurrentStateFlavor
    Load balancer flavor reference:
    name str
    Load balancer name.
    network GetCloudLoadbalancerCurrentStateNetwork
    VIP network:
    operating_status str
    Operating status of the load balancer.
    provisioning_status str
    Provisioning status of the load balancer.
    region str
    Region.
    availabilityZone String
    Availability zone.
    description String
    Load balancer description.
    flavor Property Map
    Load balancer flavor reference:
    name String
    Load balancer name.
    network Property Map
    VIP network:
    operatingStatus String
    Operating status of the load balancer.
    provisioningStatus String
    Provisioning status of the load balancer.
    region String
    Region.

    GetCloudLoadbalancerCurrentStateFlavor

    Id string
    ID of the load balancer.
    Id string
    ID of the load balancer.
    id string
    ID of the load balancer.
    id String
    ID of the load balancer.
    id string
    ID of the load balancer.
    id str
    ID of the load balancer.
    id String
    ID of the load balancer.

    GetCloudLoadbalancerCurrentStateNetwork

    Addresses List<GetCloudLoadbalancerCurrentStateNetworkAddress>
    Addresses carried by the VIP port:
    Id string
    ID of the load balancer.
    SubnetId string
    Subnet ID.
    Addresses []GetCloudLoadbalancerCurrentStateNetworkAddress
    Addresses carried by the VIP port:
    Id string
    ID of the load balancer.
    SubnetId string
    Subnet ID.
    addresses list(object)
    Addresses carried by the VIP port:
    id string
    ID of the load balancer.
    subnet_id string
    Subnet ID.
    addresses List<GetCloudLoadbalancerCurrentStateNetworkAddress>
    Addresses carried by the VIP port:
    id String
    ID of the load balancer.
    subnetId String
    Subnet ID.
    addresses GetCloudLoadbalancerCurrentStateNetworkAddress[]
    Addresses carried by the VIP port:
    id string
    ID of the load balancer.
    subnetId string
    Subnet ID.
    addresses Sequence[GetCloudLoadbalancerCurrentStateNetworkAddress]
    Addresses carried by the VIP port:
    id str
    ID of the load balancer.
    subnet_id str
    Subnet ID.
    addresses List<Property Map>
    Addresses carried by the VIP port:
    id String
    ID of the load balancer.
    subnetId String
    Subnet ID.

    GetCloudLoadbalancerCurrentStateNetworkAddress

    Ip string
    IP address.
    Type string
    Address type (FIXED, FLOATING).
    Ip string
    IP address.
    Type string
    Address type (FIXED, FLOATING).
    ip string
    IP address.
    type string
    Address type (FIXED, FLOATING).
    ip String
    IP address.
    type String
    Address type (FIXED, FLOATING).
    ip string
    IP address.
    type string
    Address type (FIXED, FLOATING).
    ip str
    IP address.
    type str
    Address type (FIXED, FLOATING).
    ip String
    IP address.
    type String
    Address type (FIXED, FLOATING).

    GetCloudLoadbalancerNetwork

    Id string
    ID of the load balancer.
    Ip string
    IP address.
    SubnetId string
    Subnet ID.
    Id string
    ID of the load balancer.
    Ip string
    IP address.
    SubnetId string
    Subnet ID.
    id string
    ID of the load balancer.
    ip string
    IP address.
    subnet_id string
    Subnet ID.
    id String
    ID of the load balancer.
    ip String
    IP address.
    subnetId String
    Subnet ID.
    id string
    ID of the load balancer.
    ip string
    IP address.
    subnetId string
    Subnet ID.
    id str
    ID of the load balancer.
    ip str
    IP address.
    subnet_id str
    Subnet ID.
    id String
    ID of the load balancer.
    ip String
    IP address.
    subnetId String
    Subnet ID.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.21.0
    published on Friday, Sep 25, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial