"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.Node = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage vke node
 * ## 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 = new volcengine.vke.NodePool("fooNodePool", {
 *     clusterId: fooCluster.id,
 *     autoScaling: {
 *         enabled: false,
 *     },
 *     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: 50,
 *         },
 *         dataVolumes: [{
 *             type: "ESSD_PL0",
 *             size: 50,
 *             mountPoint: "/tf",
 *         }],
 *         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 fooInstance = new volcengine.ecs.Instance("fooInstance", {
 *     instanceName: "acc-test-ecs",
 *     hostName: "tf-acc-test",
 *     imageId: fooImages.then(fooImages => .filter(image => image.imageName == "veLinux 1.0 CentOS兼容版 64位").map(image => (image.imageId))[0]),
 *     instanceType: "ecs.g1ie.xlarge",
 *     password: "93f0cb0614Aab12",
 *     instanceChargeType: "PostPaid",
 *     systemVolumeType: "ESSD_PL0",
 *     systemVolumeSize: 50,
 *     dataVolumes: [{
 *         volumeType: "ESSD_PL0",
 *         size: 50,
 *         deleteWithInstance: true,
 *     }],
 *     subnetId: fooSubnet.id,
 *     securityGroupIds: [fooSecurityGroup.id],
 *     projectName: "default",
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * const fooNode = new volcengine.vke.Node("fooNode", {
 *     clusterId: fooCluster.id,
 *     instanceId: fooInstance.id,
 *     nodePoolId: fooNodePool.id,
 * });
 * ```
 *
 * ## Import
 *
 * VKE node can be imported using the node id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:vke/node:Node default nc5t5epmrsf****
 * ```
 */
class Node extends pulumi.CustomResource {
    /**
     * Get an existing Node 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, id, state, opts) {
        return new Node(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Node.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === Node.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["additionalContainerStorageEnabled"] = state ? state.additionalContainerStorageEnabled : undefined;
            resourceInputs["clientToken"] = state ? state.clientToken : undefined;
            resourceInputs["clusterId"] = state ? state.clusterId : undefined;
            resourceInputs["containerStoragePath"] = state ? state.containerStoragePath : undefined;
            resourceInputs["imageId"] = state ? state.imageId : undefined;
            resourceInputs["initializeScript"] = state ? state.initializeScript : undefined;
            resourceInputs["instanceId"] = state ? state.instanceId : undefined;
            resourceInputs["keepInstanceName"] = state ? state.keepInstanceName : undefined;
            resourceInputs["kubernetesConfig"] = state ? state.kubernetesConfig : undefined;
            resourceInputs["nodePoolId"] = state ? state.nodePoolId : undefined;
            resourceInputs["preScript"] = state ? state.preScript : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.clusterId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'clusterId'");
            }
            if ((!args || args.instanceId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'instanceId'");
            }
            resourceInputs["additionalContainerStorageEnabled"] = args ? args.additionalContainerStorageEnabled : undefined;
            resourceInputs["clientToken"] = args ? args.clientToken : undefined;
            resourceInputs["clusterId"] = args ? args.clusterId : undefined;
            resourceInputs["containerStoragePath"] = args ? args.containerStoragePath : undefined;
            resourceInputs["imageId"] = args ? args.imageId : undefined;
            resourceInputs["initializeScript"] = args ? args.initializeScript : undefined;
            resourceInputs["instanceId"] = args ? args.instanceId : undefined;
            resourceInputs["keepInstanceName"] = args ? args.keepInstanceName : undefined;
            resourceInputs["kubernetesConfig"] = args ? args.kubernetesConfig : undefined;
            resourceInputs["nodePoolId"] = args ? args.nodePoolId : undefined;
            resourceInputs["preScript"] = args ? args.preScript : undefined;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Node.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Node = Node;
/** @internal */
Node.__pulumiType = 'volcengine:vke/node:Node';
//# sourceMappingURL=node.js.map