vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs
vkcs.getLbLoadbalancer
Explore with Pulumi AI
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:
getLbLoadbalancer Result
The following output properties are available:
- Admin
State boolUp - boolean → The administrative state of the Loadbalancer.
- Availability
Zone 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
- Security
Group List<string>Ids - set of string → A list of security group IDs applied to the Loadbalancer.
- List<string>
- set of string → A list of simple strings assigned to the loadbalancer.
- Vip
Address string - string → The ip address of the Loadbalancer.
- Vip
Network stringId - 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 stringId - string → The port UUID of the Loadbalancer.
- Vip
Subnet stringId - string → The subnet on which the Loadbalancer's address is allocated.
- Admin
State boolUp - boolean → The administrative state of the Loadbalancer.
- Availability
Zone 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
- Security
Group []stringIds - set of string → A list of security group IDs applied to the Loadbalancer.
- []string
- set of string → A list of simple strings assigned to the loadbalancer.
- Vip
Address string - string → The ip address of the Loadbalancer.
- Vip
Network stringId - 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 stringId - string → The port UUID of the Loadbalancer.
- Vip
Subnet stringId - string → The subnet on which the Loadbalancer's address is allocated.
- admin
State BooleanUp - boolean → The administrative state of the Loadbalancer.
- availability
Zone 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
- security
Group List<String>Ids - set of string → A list of security group IDs applied to the Loadbalancer.
- List<String>
- set of string → A list of simple strings assigned to the loadbalancer.
- vip
Address String - string → The ip address of the Loadbalancer.
- vip
Network StringId - 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 StringId - string → The port UUID of the Loadbalancer.
- vip
Subnet StringId - string → The subnet on which the Loadbalancer's address is allocated.
- admin
State booleanUp - boolean → The administrative state of the Loadbalancer.
- availability
Zone 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
- security
Group string[]Ids - set of string → A list of security group IDs applied to the Loadbalancer.
- string[]
- set of string → A list of simple strings assigned to the loadbalancer.
- vip
Address string - string → The ip address of the Loadbalancer.
- vip
Network stringId - 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 stringId - string → The port UUID of the Loadbalancer.
- vip
Subnet stringId - string → The subnet on which the Loadbalancer's address is allocated.
- admin_
state_ boolup - 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_ Sequence[str]ids - set of string → A list of security group IDs applied to the Loadbalancer.
- 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_ strid - 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_ strid - string → The port UUID of the Loadbalancer.
- vip_
subnet_ strid - string → The subnet on which the Loadbalancer's address is allocated.
- admin
State BooleanUp - boolean → The administrative state of the Loadbalancer.
- availability
Zone 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
- security
Group List<String>Ids - set of string → A list of security group IDs applied to the Loadbalancer.
- List<String>
- set of string → A list of simple strings assigned to the loadbalancer.
- vip
Address String - string → The ip address of the Loadbalancer.
- vip
Network StringId - 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 StringId - string → The port UUID of the Loadbalancer.
- vip
Subnet StringId - 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.