UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

144 lines 4.84 kB
"use strict"; // *** 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.getClustersOutput = exports.getClusters = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to query detailed information of vke clusters * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-project1", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-subnet-test-2", * cidrBlock: "172.16.0.0/24", * zoneId: "cn-beijing-a", * vpcId: fooVpc.id, * }); * const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", { * vpcId: fooVpc.id, * securityGroupName: "acc-test-security-group2", * }); * const fooCluster = new volcengine.vke.Cluster("fooCluster", { * description: "created by terraform", * deleteProtectionEnabled: false, * clusterConfig: { * subnetIds: [fooSubnet.id], * apiServerPublicAccessEnabled: true, * apiServerPublicAccessConfig: { * publicAccessNetworkConfig: { * billingType: "PostPaidByBandwidth", * bandwidth: 1, * }, * }, * resourcePublicAccessDefaultEnabled: true, * }, * podsConfig: { * podNetworkMode: "VpcCniShared", * vpcCniConfig: { * subnetIds: [fooSubnet.id], * }, * }, * servicesConfig: { * serviceCidrsv4s: ["172.30.0.0/18"], * }, * tags: [{ * key: "tf-k1", * value: "tf-v1", * }], * }); * const fooClusters = volcengine.vke.getClustersOutput({ * ids: [fooCluster.id], * }); * ``` */ function getClusters(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("volcengine:vke/getClusters:getClusters", { "createClientToken": args.createClientToken, "deleteProtectionEnabled": args.deleteProtectionEnabled, "ids": args.ids, "name": args.name, "nameRegex": args.nameRegex, "outputFile": args.outputFile, "pageNumber": args.pageNumber, "pageSize": args.pageSize, "podsConfigPodNetworkMode": args.podsConfigPodNetworkMode, "projectName": args.projectName, "statuses": args.statuses, "tags": args.tags, "updateClientToken": args.updateClientToken, }, opts); } exports.getClusters = getClusters; /** * Use this data source to query detailed information of vke clusters * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-project1", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-subnet-test-2", * cidrBlock: "172.16.0.0/24", * zoneId: "cn-beijing-a", * vpcId: fooVpc.id, * }); * const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", { * vpcId: fooVpc.id, * securityGroupName: "acc-test-security-group2", * }); * const fooCluster = new volcengine.vke.Cluster("fooCluster", { * description: "created by terraform", * deleteProtectionEnabled: false, * clusterConfig: { * subnetIds: [fooSubnet.id], * apiServerPublicAccessEnabled: true, * apiServerPublicAccessConfig: { * publicAccessNetworkConfig: { * billingType: "PostPaidByBandwidth", * bandwidth: 1, * }, * }, * resourcePublicAccessDefaultEnabled: true, * }, * podsConfig: { * podNetworkMode: "VpcCniShared", * vpcCniConfig: { * subnetIds: [fooSubnet.id], * }, * }, * servicesConfig: { * serviceCidrsv4s: ["172.30.0.0/18"], * }, * tags: [{ * key: "tf-k1", * value: "tf-v1", * }], * }); * const fooClusters = volcengine.vke.getClustersOutput({ * ids: [fooCluster.id], * }); * ``` */ function getClustersOutput(args, opts) { return pulumi.output(args).apply((a) => getClusters(a, opts)); } exports.getClustersOutput = getClustersOutput; //# sourceMappingURL=getClusters.js.map