UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

220 lines (219 loc) 7.17 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage vke default node pool * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * 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 fooInstance = new volcengine.ecs.Instance("fooInstance", { * imageId: "image-ybqi99s7yq8rx7mnk44b", * instanceType: "ecs.g1ie.large", * instanceName: "acc-test-ecs-name2", * password: "93f0cb0614Aab12", * instanceChargeType: "PostPaid", * systemVolumeType: "ESSD_PL0", * systemVolumeSize: 40, * subnetId: fooSubnet.id, * securityGroupIds: [fooSecurityGroup.id], * }); * 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 fooDefaultNodePool = new volcengine.vke.DefaultNodePool("fooDefaultNodePool", { * clusterId: fooCluster.id, * nodeConfig: { * security: { * login: { * password: "amw4WTdVcTRJVVFsUXpVTw==", * }, * securityGroupIds: [fooSecurityGroup.id], * securityStrategies: ["Hids"], * }, * initializeScript: "ISMvYmluL2Jhc2gKZWNobyAx", * }, * kubernetesConfig: { * labels: [ * { * key: "tf-key1", * value: "tf-value1", * }, * { * key: "tf-key2", * value: "tf-value2", * }, * ], * taints: [ * { * key: "tf-key3", * value: "tf-value3", * effect: "NoSchedule", * }, * { * key: "tf-key4", * value: "tf-value4", * effect: "NoSchedule", * }, * ], * cordon: true, * }, * tags: [{ * key: "tf-k1", * value: "tf-v1", * }], * }); * ``` * * ## Import * * VKE default node can be imported using the node id, e.g. * * ```sh * $ pulumi import volcengine:vke/defaultNodePool:DefaultNodePool default nc5t5epmrsf**** * ``` */ export declare class DefaultNodePool extends pulumi.CustomResource { /** * Get an existing DefaultNodePool resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DefaultNodePoolState, opts?: pulumi.CustomResourceOptions): DefaultNodePool; /** * Returns true if the given object is an instance of DefaultNodePool. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is DefaultNodePool; /** * The ClusterId of NodePool. */ readonly clusterId: pulumi.Output<string>; /** * The ECS InstanceIds add to NodePool. */ readonly instances: pulumi.Output<outputs.vke.DefaultNodePoolInstance[] | undefined>; /** * Is import of the DefaultNodePool. It only works when imported, set to true. */ readonly isImport: pulumi.Output<boolean>; /** * The KubernetesConfig of NodeConfig. */ readonly kubernetesConfig: pulumi.Output<outputs.vke.DefaultNodePoolKubernetesConfig>; /** * The Config of NodePool. */ readonly nodeConfig: pulumi.Output<outputs.vke.DefaultNodePoolNodeConfig>; /** * Tags. */ readonly tags: pulumi.Output<outputs.vke.DefaultNodePoolTag[] | undefined>; /** * Create a DefaultNodePool resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DefaultNodePoolArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DefaultNodePool resources. */ export interface DefaultNodePoolState { /** * The ClusterId of NodePool. */ clusterId?: pulumi.Input<string>; /** * The ECS InstanceIds add to NodePool. */ instances?: pulumi.Input<pulumi.Input<inputs.vke.DefaultNodePoolInstance>[]>; /** * Is import of the DefaultNodePool. It only works when imported, set to true. */ isImport?: pulumi.Input<boolean>; /** * The KubernetesConfig of NodeConfig. */ kubernetesConfig?: pulumi.Input<inputs.vke.DefaultNodePoolKubernetesConfig>; /** * The Config of NodePool. */ nodeConfig?: pulumi.Input<inputs.vke.DefaultNodePoolNodeConfig>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.vke.DefaultNodePoolTag>[]>; } /** * The set of arguments for constructing a DefaultNodePool resource. */ export interface DefaultNodePoolArgs { /** * The ClusterId of NodePool. */ clusterId: pulumi.Input<string>; /** * The ECS InstanceIds add to NodePool. */ instances?: pulumi.Input<pulumi.Input<inputs.vke.DefaultNodePoolInstance>[]>; /** * The KubernetesConfig of NodeConfig. */ kubernetesConfig: pulumi.Input<inputs.vke.DefaultNodePoolKubernetesConfig>; /** * The Config of NodePool. */ nodeConfig: pulumi.Input<inputs.vke.DefaultNodePoolNodeConfig>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.vke.DefaultNodePoolTag>[]>; }