"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.NodePool = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * "A set of Kubernetes nodes in a cluster with common configuration and specification."
 *
 * To get more information about NodePool, see:
 *
 * * [API documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/container/rest/v1/projects.locations.clusters.nodePools)
 * * How-to Guides
 *     * [Google Distributed Cloud Edge](https://cloud.google.com/distributed-cloud/edge/latest/docs)
 *
 * ## Example Usage
 *
 * ### Edgecontainer Local Control Plane Node Pool
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const project = gcp.organizations.getProject({});
 * const _default = new gcp.edgecontainer.Cluster("default", {
 *     name: "default",
 *     location: "us-central1",
 *     authorization: {
 *         adminUsers: {
 *             username: "admin@hashicorptest.com",
 *         },
 *     },
 *     networking: {
 *         clusterIpv4CidrBlocks: ["10.0.0.0/16"],
 *         servicesIpv4CidrBlocks: ["10.1.0.0/16"],
 *     },
 *     fleet: {
 *         project: project.then(project => `projects/${project.number}`),
 *     },
 *     externalLoadBalancerIpv4AddressPools: ["10.100.0.0-10.100.0.10"],
 *     controlPlane: {
 *         local: {
 *             nodeLocation: "us-central1-edge-example-edgesite",
 *             nodeCount: 1,
 *             machineFilter: "machine-name",
 *             sharedDeploymentPolicy: "ALLOWED",
 *         },
 *     },
 * });
 * const defaultNodePool = new gcp.edgecontainer.NodePool("default", {
 *     name: "nodepool-1",
 *     cluster: cluster.name,
 *     location: "us-central1",
 *     nodeLocation: "us-central1-edge-example-edgesite",
 *     nodeCount: 3,
 * });
 * ```
 *
 * ## Import
 *
 * NodePool can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}`
 *
 * * `{{project}}/{{location}}/{{cluster}}/{{name}}`
 *
 * * `{{location}}/{{cluster}}/{{name}}`
 *
 * When using the `pulumi import` command, NodePool can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:edgecontainer/nodePool:NodePool default projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:edgecontainer/nodePool:NodePool default {{project}}/{{location}}/{{cluster}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:edgecontainer/nodePool:NodePool default {{location}}/{{cluster}}/{{name}}
 * ```
 */
class NodePool extends pulumi.CustomResource {
    /**
     * Get an existing NodePool 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 NodePool(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of NodePool.  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'] === NodePool.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["cluster"] = state?.cluster;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["localDiskEncryption"] = state?.localDiskEncryption;
            resourceInputs["location"] = state?.location;
            resourceInputs["machineFilter"] = state?.machineFilter;
            resourceInputs["name"] = state?.name;
            resourceInputs["nodeConfig"] = state?.nodeConfig;
            resourceInputs["nodeCount"] = state?.nodeCount;
            resourceInputs["nodeLocation"] = state?.nodeLocation;
            resourceInputs["nodeVersion"] = state?.nodeVersion;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.cluster === undefined && !opts.urn) {
                throw new Error("Missing required property 'cluster'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.nodeCount === undefined && !opts.urn) {
                throw new Error("Missing required property 'nodeCount'");
            }
            if (args?.nodeLocation === undefined && !opts.urn) {
                throw new Error("Missing required property 'nodeLocation'");
            }
            resourceInputs["cluster"] = args?.cluster;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["localDiskEncryption"] = args?.localDiskEncryption;
            resourceInputs["location"] = args?.location;
            resourceInputs["machineFilter"] = args?.machineFilter;
            resourceInputs["name"] = args?.name;
            resourceInputs["nodeConfig"] = args?.nodeConfig;
            resourceInputs["nodeCount"] = args?.nodeCount;
            resourceInputs["nodeLocation"] = args?.nodeLocation;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["nodeVersion"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(NodePool.__pulumiType, name, resourceInputs, opts);
    }
}
exports.NodePool = NodePool;
/** @internal */
NodePool.__pulumiType = 'gcp:edgecontainer/nodePool:NodePool';
//# sourceMappingURL=nodePool.js.map