@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
401 lines (400 loc) • 12.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Use this data source to query detailed information of vke node pools
* ## 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 fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
* securityGroupName: "acc-test-security-group",
* vpcId: fooVpc.id,
* });
* const fooImages = volcengine.ecs.getImages({
* nameRegex: "veLinux 1.0 CentOS兼容版 64位",
* });
* 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 fooNodePool: volcengine.vke.NodePool[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* fooNodePool.push(new volcengine.vke.NodePool(`fooNodePool-${range.value}`, {
* clusterId: fooCluster.id,
* autoScaling: {
* enabled: true,
* minReplicas: 0,
* maxReplicas: 5,
* desiredReplicas: 0,
* priority: 5,
* subnetPolicy: "ZoneBalance",
* },
* nodeConfig: {
* instanceTypeIds: ["ecs.g1ie.xlarge"],
* subnetIds: [fooSubnet.id],
* imageId: fooImages.then(fooImages => .filter(image => image.imageName == "veLinux 1.0 CentOS兼容版 64位").map(image => (image.imageId))[0]),
* systemVolume: {
* type: "ESSD_PL0",
* size: 60,
* },
* dataVolumes: [
* {
* type: "ESSD_PL0",
* size: 60,
* mountPoint: "/tf1",
* },
* {
* type: "ESSD_PL0",
* size: 60,
* mountPoint: "/tf2",
* },
* ],
* initializeScript: "ZWNobyBoZWxsbyB0ZXJyYWZvcm0h",
* security: {
* login: {
* password: "UHdkMTIzNDU2",
* },
* securityStrategies: ["Hids"],
* securityGroupIds: [fooSecurityGroup.id],
* },
* additionalContainerStorageEnabled: true,
* instanceChargeType: "PostPaid",
* namePrefix: "acc-test",
* ecsTags: [{
* key: "ecs_k1",
* value: "ecs_v1",
* }],
* },
* kubernetesConfig: {
* labels: [{
* key: "label1",
* value: "value1",
* }],
* taints: [{
* key: "taint-key/node-type",
* value: "taint-value",
* effect: "NoSchedule",
* }],
* cordon: true,
* },
* tags: [{
* key: "node-pool-k1",
* value: "node-pool-v1",
* }],
* }));
* }
* const fooNodePools = volcengine.vke.getNodePoolsOutput({
* ids: fooNodePool.map(__item => __item.id),
* });
* ```
*/
/** @deprecated volcengine.vke.NodePools has been deprecated in favor of volcengine.vke.getNodePools */
export declare function nodePools(args?: NodePoolsArgs, opts?: pulumi.InvokeOptions): Promise<NodePoolsResult>;
/**
* A collection of arguments for invoking NodePools.
*/
export interface NodePoolsArgs {
/**
* Is enabled of AutoScaling.
*/
autoScalingEnabled?: boolean;
/**
* The ClusterId of NodePool.
*/
clusterId?: string;
/**
* The ClusterIds of NodePool IDs.
*/
clusterIds?: string[];
/**
* The ClientToken when successfully created.
*/
createClientToken?: string;
/**
* The IDs of NodePool.
*/
ids?: string[];
/**
* The Name of NodePool.
*/
name?: string;
/**
* A Name Regex of NodePool.
*/
nameRegex?: string;
/**
* File name where to save data source results.
*/
outputFile?: string;
/**
* The Status of NodePool.
*/
statuses?: inputs.vke.NodePoolsStatus[];
/**
* Tags.
*/
tags?: inputs.vke.NodePoolsTag[];
/**
* The ClientToken when last update was successful.
*/
updateClientToken?: string;
}
/**
* A collection of values returned by NodePools.
*/
export interface NodePoolsResult {
readonly autoScalingEnabled?: boolean;
/**
* The ClusterId of NodePool.
*/
readonly clusterId?: string;
readonly clusterIds?: string[];
/**
* The ClientToken when successfully created.
*/
readonly createClientToken?: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly ids?: string[];
/**
* The Name of NodePool.
*/
readonly name?: string;
readonly nameRegex?: string;
/**
* The collection of NodePools query.
*/
readonly nodePools: outputs.vke.NodePoolsNodePool[];
readonly outputFile?: string;
readonly statuses?: outputs.vke.NodePoolsStatus[];
/**
* Tags of the NodePool.
*/
readonly tags?: outputs.vke.NodePoolsTag[];
/**
* Returns the total amount of the data list.
*/
readonly totalCount: number;
/**
* The ClientToken when last update was successful.
*/
readonly updateClientToken?: string;
}
/**
* Use this data source to query detailed information of vke node pools
* ## 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 fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
* securityGroupName: "acc-test-security-group",
* vpcId: fooVpc.id,
* });
* const fooImages = volcengine.ecs.getImages({
* nameRegex: "veLinux 1.0 CentOS兼容版 64位",
* });
* 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 fooNodePool: volcengine.vke.NodePool[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* fooNodePool.push(new volcengine.vke.NodePool(`fooNodePool-${range.value}`, {
* clusterId: fooCluster.id,
* autoScaling: {
* enabled: true,
* minReplicas: 0,
* maxReplicas: 5,
* desiredReplicas: 0,
* priority: 5,
* subnetPolicy: "ZoneBalance",
* },
* nodeConfig: {
* instanceTypeIds: ["ecs.g1ie.xlarge"],
* subnetIds: [fooSubnet.id],
* imageId: fooImages.then(fooImages => .filter(image => image.imageName == "veLinux 1.0 CentOS兼容版 64位").map(image => (image.imageId))[0]),
* systemVolume: {
* type: "ESSD_PL0",
* size: 60,
* },
* dataVolumes: [
* {
* type: "ESSD_PL0",
* size: 60,
* mountPoint: "/tf1",
* },
* {
* type: "ESSD_PL0",
* size: 60,
* mountPoint: "/tf2",
* },
* ],
* initializeScript: "ZWNobyBoZWxsbyB0ZXJyYWZvcm0h",
* security: {
* login: {
* password: "UHdkMTIzNDU2",
* },
* securityStrategies: ["Hids"],
* securityGroupIds: [fooSecurityGroup.id],
* },
* additionalContainerStorageEnabled: true,
* instanceChargeType: "PostPaid",
* namePrefix: "acc-test",
* ecsTags: [{
* key: "ecs_k1",
* value: "ecs_v1",
* }],
* },
* kubernetesConfig: {
* labels: [{
* key: "label1",
* value: "value1",
* }],
* taints: [{
* key: "taint-key/node-type",
* value: "taint-value",
* effect: "NoSchedule",
* }],
* cordon: true,
* },
* tags: [{
* key: "node-pool-k1",
* value: "node-pool-v1",
* }],
* }));
* }
* const fooNodePools = volcengine.vke.getNodePoolsOutput({
* ids: fooNodePool.map(__item => __item.id),
* });
* ```
*/
/** @deprecated volcengine.vke.NodePools has been deprecated in favor of volcengine.vke.getNodePools */
export declare function nodePoolsOutput(args?: NodePoolsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<NodePoolsResult>;
/**
* A collection of arguments for invoking NodePools.
*/
export interface NodePoolsOutputArgs {
/**
* Is enabled of AutoScaling.
*/
autoScalingEnabled?: pulumi.Input<boolean>;
/**
* The ClusterId of NodePool.
*/
clusterId?: pulumi.Input<string>;
/**
* The ClusterIds of NodePool IDs.
*/
clusterIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The ClientToken when successfully created.
*/
createClientToken?: pulumi.Input<string>;
/**
* The IDs of NodePool.
*/
ids?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The Name of NodePool.
*/
name?: pulumi.Input<string>;
/**
* A Name Regex of NodePool.
*/
nameRegex?: pulumi.Input<string>;
/**
* File name where to save data source results.
*/
outputFile?: pulumi.Input<string>;
/**
* The Status of NodePool.
*/
statuses?: pulumi.Input<pulumi.Input<inputs.vke.NodePoolsStatusArgs>[]>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.vke.NodePoolsTagArgs>[]>;
/**
* The ClientToken when last update was successful.
*/
updateClientToken?: pulumi.Input<string>;
}