@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
117 lines • 4.04 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getClbsOutput = exports.getClbs = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this data source to query detailed information of clbs
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooZones = volcengine.ecs.getZones({});
* const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
* vpcName: "acc-test-vpc",
* cidrBlock: "172.16.0.0/16",
* });
* const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
* subnetName: "acc-test-subnet",
* cidrBlock: "172.16.0.0/24",
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* vpcId: fooVpc.id,
* });
* const fooClb: volcengine.clb.Clb[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* fooClb.push(new volcengine.clb.Clb(`fooClb-${range.value}`, {
* type: "public",
* subnetId: fooSubnet.id,
* loadBalancerSpec: "small_1",
* description: "acc-test-demo",
* loadBalancerName: `acc-test-clb-${range.value}`,
* loadBalancerBillingType: "PostPaid",
* eipBillingConfig: {
* isp: "BGP",
* eipBillingType: "PostPaidByBandwidth",
* bandwidth: 1,
* },
* tags: [{
* key: "k1",
* value: "v1",
* }],
* }));
* }
* const fooClbs = volcengine.clb.getClbsOutput({
* ids: fooClb.map(__item => __item.id),
* });
* ```
*/
function getClbs(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("volcengine:clb/getClbs:getClbs", {
"eniAddress": args.eniAddress,
"ids": args.ids,
"loadBalancerName": args.loadBalancerName,
"nameRegex": args.nameRegex,
"outputFile": args.outputFile,
"projectName": args.projectName,
"tags": args.tags,
"vpcId": args.vpcId,
}, opts);
}
exports.getClbs = getClbs;
/**
* Use this data source to query detailed information of clbs
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooZones = volcengine.ecs.getZones({});
* const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
* vpcName: "acc-test-vpc",
* cidrBlock: "172.16.0.0/16",
* });
* const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
* subnetName: "acc-test-subnet",
* cidrBlock: "172.16.0.0/24",
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* vpcId: fooVpc.id,
* });
* const fooClb: volcengine.clb.Clb[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* fooClb.push(new volcengine.clb.Clb(`fooClb-${range.value}`, {
* type: "public",
* subnetId: fooSubnet.id,
* loadBalancerSpec: "small_1",
* description: "acc-test-demo",
* loadBalancerName: `acc-test-clb-${range.value}`,
* loadBalancerBillingType: "PostPaid",
* eipBillingConfig: {
* isp: "BGP",
* eipBillingType: "PostPaidByBandwidth",
* bandwidth: 1,
* },
* tags: [{
* key: "k1",
* value: "v1",
* }],
* }));
* }
* const fooClbs = volcengine.clb.getClbsOutput({
* ids: fooClb.map(__item => __item.id),
* });
* ```
*/
function getClbsOutput(args, opts) {
return pulumi.output(args).apply((a) => getClbs(a, opts));
}
exports.getClbsOutput = getClbsOutput;
//# sourceMappingURL=getClbs.js.map