1. Packages
  2. Vkcs Provider
  3. API Docs
  4. getLbLoadbalancer
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.getLbLoadbalancer

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Use this data source to get the details of a loadbalancer

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const app = vkcs.getLbLoadbalancer({
        id: vkcs_lb_loadbalancer.app.id,
    });
    const appPort = app.then(app => vkcs.getNetworkingPort({
        id: app.vipPortId,
    }));
    export const usedVips = appPort.then(appPort => appPort.allFixedIps);
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    app = vkcs.get_lb_loadbalancer(id=vkcs_lb_loadbalancer["app"]["id"])
    app_port = vkcs.get_networking_port(id=app.vip_port_id)
    pulumi.export("usedVips", app_port.all_fixed_ips)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		app, err := vkcs.LookupLbLoadbalancer(ctx, &vkcs.LookupLbLoadbalancerArgs{
    			Id: vkcs_lb_loadbalancer.App.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		appPort, err := vkcs.LookupNetworkingPort(ctx, &vkcs.LookupNetworkingPortArgs{
    			Id: pulumi.StringRef(app.VipPortId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("usedVips", appPort.AllFixedIps)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var app = Vkcs.GetLbLoadbalancer.Invoke(new()
        {
            Id = vkcs_lb_loadbalancer.App.Id,
        });
    
        var appPort = Vkcs.GetNetworkingPort.Invoke(new()
        {
            Id = app.Apply(getLbLoadbalancerResult => getLbLoadbalancerResult.VipPortId),
        });
    
        return new Dictionary<string, object?>
        {
            ["usedVips"] = appPort.Apply(getNetworkingPortResult => getNetworkingPortResult.AllFixedIps),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.VkcsFunctions;
    import com.pulumi.vkcs.inputs.GetLbLoadbalancerArgs;
    import com.pulumi.vkcs.inputs.GetNetworkingPortArgs;
    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 app = VkcsFunctions.getLbLoadbalancer(GetLbLoadbalancerArgs.builder()
                .id(vkcs_lb_loadbalancer.app().id())
                .build());
    
            final var appPort = VkcsFunctions.getNetworkingPort(GetNetworkingPortArgs.builder()
                .id(app.applyValue(getLbLoadbalancerResult -> getLbLoadbalancerResult.vipPortId()))
                .build());
    
            ctx.export("usedVips", appPort.applyValue(getNetworkingPortResult -> getNetworkingPortResult.allFixedIps()));
        }
    }
    
    variables:
      app:
        fn::invoke:
          function: vkcs:getLbLoadbalancer
          arguments:
            id: ${vkcs_lb_loadbalancer.app.id}
      appPort:
        fn::invoke:
          function: vkcs:getNetworkingPort
          arguments:
            id: ${app.vipPortId}
    outputs:
      usedVips: ${appPort.allFixedIps}
    

    Using getLbLoadbalancer

    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 getLbLoadbalancer(args: GetLbLoadbalancerArgs, opts?: InvokeOptions): Promise<GetLbLoadbalancerResult>
    function getLbLoadbalancerOutput(args: GetLbLoadbalancerOutputArgs, opts?: InvokeOptions): Output<GetLbLoadbalancerResult>
    def get_lb_loadbalancer(id: Optional[str] = None,
                            region: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetLbLoadbalancerResult
    def get_lb_loadbalancer_output(id: Optional[pulumi.Input[str]] = None,
                            region: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetLbLoadbalancerResult]
    func LookupLbLoadbalancer(ctx *Context, args *LookupLbLoadbalancerArgs, opts ...InvokeOption) (*LookupLbLoadbalancerResult, error)
    func LookupLbLoadbalancerOutput(ctx *Context, args *LookupLbLoadbalancerOutputArgs, opts ...InvokeOption) LookupLbLoadbalancerResultOutput

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

    public static class GetLbLoadbalancer 
    {
        public static Task<GetLbLoadbalancerResult> InvokeAsync(GetLbLoadbalancerArgs args, InvokeOptions? opts = null)
        public static Output<GetLbLoadbalancerResult> Invoke(GetLbLoadbalancerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLbLoadbalancerResult> getLbLoadbalancer(GetLbLoadbalancerArgs args, InvokeOptions options)
    public static Output<GetLbLoadbalancerResult> getLbLoadbalancer(GetLbLoadbalancerArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vkcs:index/getLbLoadbalancer:getLbLoadbalancer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    required string → The UUID of the Loadbalancer
    Region string
    optional string → The region in which to obtain the Loadbalancer client. If omitted, the region argument of the provider is used.
    Id string
    required string → The UUID of the Loadbalancer
    Region string
    optional string → The region in which to obtain the Loadbalancer client. If omitted, the region argument of the provider is used.
    id String
    required string → The UUID of the Loadbalancer
    region String
    optional string → The region in which to obtain the Loadbalancer client. If omitted, the region argument of the provider is used.
    id string
    required string → The UUID of the Loadbalancer
    region string
    optional string → The region in which to obtain the Loadbalancer client. If omitted, the region argument of the provider is used.
    id str
    required string → The UUID of the Loadbalancer
    region str
    optional string → The region in which to obtain the Loadbalancer client. If omitted, the region argument of the provider is used.
    id String
    required string → The UUID of the Loadbalancer
    region String
    optional string → The region in which to obtain the Loadbalancer client. If omitted, the region argument of the provider is used.

    getLbLoadbalancer Result

    The following output properties are available:

    AdminStateUp bool
    boolean → The administrative state of the Loadbalancer.
    AvailabilityZone string
    string → The availability zone of the Loadbalancer.
    Description string
    string → Human-readable description of the Loadbalancer.
    Id string
    Name string
    string → The name of the Loadbalancer.
    Region string
    SecurityGroupIds List<string>
    set of string → A list of security group IDs applied to the Loadbalancer.
    Tags List<string>
    set of string → A list of simple strings assigned to the loadbalancer.
    VipAddress string
    string → The ip address of the Loadbalancer.
    VipNetworkId string
    string → The network on which to allocate the Loadbalancer's address. A tenant can only create Loadbalancers on networks authorized by policy (e.g. networks that belong to them or networks that are shared). Changing this creates a new loadbalancer.
    VipPortId string
    string → The port UUID of the Loadbalancer.
    VipSubnetId string
    string → The subnet on which the Loadbalancer's address is allocated.
    AdminStateUp bool
    boolean → The administrative state of the Loadbalancer.
    AvailabilityZone string
    string → The availability zone of the Loadbalancer.
    Description string
    string → Human-readable description of the Loadbalancer.
    Id string
    Name string
    string → The name of the Loadbalancer.
    Region string
    SecurityGroupIds []string
    set of string → A list of security group IDs applied to the Loadbalancer.
    Tags []string
    set of string → A list of simple strings assigned to the loadbalancer.
    VipAddress string
    string → The ip address of the Loadbalancer.
    VipNetworkId string
    string → The network on which to allocate the Loadbalancer's address. A tenant can only create Loadbalancers on networks authorized by policy (e.g. networks that belong to them or networks that are shared). Changing this creates a new loadbalancer.
    VipPortId string
    string → The port UUID of the Loadbalancer.
    VipSubnetId string
    string → The subnet on which the Loadbalancer's address is allocated.
    adminStateUp Boolean
    boolean → The administrative state of the Loadbalancer.
    availabilityZone String
    string → The availability zone of the Loadbalancer.
    description String
    string → Human-readable description of the Loadbalancer.
    id String
    name String
    string → The name of the Loadbalancer.
    region String
    securityGroupIds List<String>
    set of string → A list of security group IDs applied to the Loadbalancer.
    tags List<String>
    set of string → A list of simple strings assigned to the loadbalancer.
    vipAddress String
    string → The ip address of the Loadbalancer.
    vipNetworkId String
    string → The network on which to allocate the Loadbalancer's address. A tenant can only create Loadbalancers on networks authorized by policy (e.g. networks that belong to them or networks that are shared). Changing this creates a new loadbalancer.
    vipPortId String
    string → The port UUID of the Loadbalancer.
    vipSubnetId String
    string → The subnet on which the Loadbalancer's address is allocated.
    adminStateUp boolean
    boolean → The administrative state of the Loadbalancer.
    availabilityZone string
    string → The availability zone of the Loadbalancer.
    description string
    string → Human-readable description of the Loadbalancer.
    id string
    name string
    string → The name of the Loadbalancer.
    region string
    securityGroupIds string[]
    set of string → A list of security group IDs applied to the Loadbalancer.
    tags string[]
    set of string → A list of simple strings assigned to the loadbalancer.
    vipAddress string
    string → The ip address of the Loadbalancer.
    vipNetworkId string
    string → The network on which to allocate the Loadbalancer's address. A tenant can only create Loadbalancers on networks authorized by policy (e.g. networks that belong to them or networks that are shared). Changing this creates a new loadbalancer.
    vipPortId string
    string → The port UUID of the Loadbalancer.
    vipSubnetId string
    string → The subnet on which the Loadbalancer's address is allocated.
    admin_state_up bool
    boolean → The administrative state of the Loadbalancer.
    availability_zone str
    string → The availability zone of the Loadbalancer.
    description str
    string → Human-readable description of the Loadbalancer.
    id str
    name str
    string → The name of the Loadbalancer.
    region str
    security_group_ids Sequence[str]
    set of string → A list of security group IDs applied to the Loadbalancer.
    tags Sequence[str]
    set of string → A list of simple strings assigned to the loadbalancer.
    vip_address str
    string → The ip address of the Loadbalancer.
    vip_network_id str
    string → The network on which to allocate the Loadbalancer's address. A tenant can only create Loadbalancers on networks authorized by policy (e.g. networks that belong to them or networks that are shared). Changing this creates a new loadbalancer.
    vip_port_id str
    string → The port UUID of the Loadbalancer.
    vip_subnet_id str
    string → The subnet on which the Loadbalancer's address is allocated.
    adminStateUp Boolean
    boolean → The administrative state of the Loadbalancer.
    availabilityZone String
    string → The availability zone of the Loadbalancer.
    description String
    string → Human-readable description of the Loadbalancer.
    id String
    name String
    string → The name of the Loadbalancer.
    region String
    securityGroupIds List<String>
    set of string → A list of security group IDs applied to the Loadbalancer.
    tags List<String>
    set of string → A list of simple strings assigned to the loadbalancer.
    vipAddress String
    string → The ip address of the Loadbalancer.
    vipNetworkId String
    string → The network on which to allocate the Loadbalancer's address. A tenant can only create Loadbalancers on networks authorized by policy (e.g. networks that belong to them or networks that are shared). Changing this creates a new loadbalancer.
    vipPortId String
    string → The port UUID of the Loadbalancer.
    vipSubnetId String
    string → The subnet on which the Loadbalancer's address is allocated.

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs