"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.BareMetalNodePool = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A Google Bare Metal Node Pool.
 *
 * To get more information about BareMetalNodePool, see:
 *
 * * [API documentation](https://cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters.bareMetalNodePools)
 *
 * ## Example Usage
 *
 * ### Gkeonprem Bare Metal Node Pool Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const default_basic = new gcp.gkeonprem.BareMetalCluster("default-basic", {
 *     name: "my-cluster",
 *     location: "us-west1",
 *     adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 *     bareMetalVersion: "1.12.3",
 *     networkConfig: {
 *         islandModeCidr: {
 *             serviceAddressCidrBlocks: ["172.26.0.0/16"],
 *             podAddressCidrBlocks: ["10.240.0.0/13"],
 *         },
 *     },
 *     controlPlane: {
 *         controlPlaneNodePoolConfig: {
 *             nodePoolConfig: {
 *                 labels: {},
 *                 operatingSystem: "LINUX",
 *                 nodeConfigs: [{
 *                     labels: {},
 *                     nodeIp: "10.200.0.9",
 *                 }],
 *             },
 *         },
 *     },
 *     loadBalancer: {
 *         portConfig: {
 *             controlPlaneLoadBalancerPort: 443,
 *         },
 *         vipConfig: {
 *             controlPlaneVip: "10.200.0.13",
 *             ingressVip: "10.200.0.14",
 *         },
 *         metalLbConfig: {
 *             addressPools: [{
 *                 pool: "pool1",
 *                 addresses: [
 *                     "10.200.0.14/32",
 *                     "10.200.0.15/32",
 *                     "10.200.0.16/32",
 *                     "10.200.0.17/32",
 *                     "10.200.0.18/32",
 *                     "fd00:1::f/128",
 *                     "fd00:1::10/128",
 *                     "fd00:1::11/128",
 *                     "fd00:1::12/128",
 *                 ],
 *             }],
 *         },
 *     },
 *     storage: {
 *         lvpShareConfig: {
 *             lvpConfig: {
 *                 path: "/mnt/localpv-share",
 *                 storageClass: "local-shared",
 *             },
 *             sharedPathPvCount: 5,
 *         },
 *         lvpNodeMountsConfig: {
 *             path: "/mnt/localpv-disk",
 *             storageClass: "local-disks",
 *         },
 *     },
 *     securityConfig: {
 *         authorization: {
 *             adminUsers: [{
 *                 username: "admin@hashicorptest.com",
 *             }],
 *         },
 *     },
 * });
 * const nodepool_basic = new gcp.gkeonprem.BareMetalNodePool("nodepool-basic", {
 *     name: "my-nodepool",
 *     bareMetalCluster: default_basic.name,
 *     location: "us-west1",
 *     nodePoolConfig: {
 *         operatingSystem: "LINUX",
 *         nodeConfigs: [{
 *             nodeIp: "10.200.0.11",
 *         }],
 *     },
 * });
 * ```
 * ### Gkeonprem Bare Metal Node Pool Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const default_full = new gcp.gkeonprem.BareMetalCluster("default-full", {
 *     name: "my-cluster",
 *     location: "us-west1",
 *     adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 *     bareMetalVersion: "1.12.3",
 *     networkConfig: {
 *         islandModeCidr: {
 *             serviceAddressCidrBlocks: ["172.26.0.0/16"],
 *             podAddressCidrBlocks: ["10.240.0.0/13"],
 *         },
 *     },
 *     controlPlane: {
 *         controlPlaneNodePoolConfig: {
 *             nodePoolConfig: {
 *                 labels: {},
 *                 operatingSystem: "LINUX",
 *                 nodeConfigs: [{
 *                     labels: {},
 *                     nodeIp: "10.200.0.9",
 *                 }],
 *             },
 *         },
 *     },
 *     loadBalancer: {
 *         portConfig: {
 *             controlPlaneLoadBalancerPort: 443,
 *         },
 *         vipConfig: {
 *             controlPlaneVip: "10.200.0.13",
 *             ingressVip: "10.200.0.14",
 *         },
 *         metalLbConfig: {
 *             addressPools: [{
 *                 pool: "pool1",
 *                 addresses: [
 *                     "10.200.0.14/32",
 *                     "10.200.0.15/32",
 *                     "10.200.0.16/32",
 *                     "10.200.0.17/32",
 *                     "10.200.0.18/32",
 *                     "fd00:1::f/128",
 *                     "fd00:1::10/128",
 *                     "fd00:1::11/128",
 *                     "fd00:1::12/128",
 *                 ],
 *             }],
 *         },
 *     },
 *     storage: {
 *         lvpShareConfig: {
 *             lvpConfig: {
 *                 path: "/mnt/localpv-share",
 *                 storageClass: "local-shared",
 *             },
 *             sharedPathPvCount: 5,
 *         },
 *         lvpNodeMountsConfig: {
 *             path: "/mnt/localpv-disk",
 *             storageClass: "local-disks",
 *         },
 *     },
 *     securityConfig: {
 *         authorization: {
 *             adminUsers: [{
 *                 username: "admin@hashicorptest.com",
 *             }],
 *         },
 *     },
 * });
 * const nodepool_full = new gcp.gkeonprem.BareMetalNodePool("nodepool-full", {
 *     name: "my-nodepool",
 *     displayName: "test-name",
 *     bareMetalCluster: default_full.name,
 *     location: "us-west1",
 *     annotations: {},
 *     nodePoolConfig: {
 *         operatingSystem: "LINUX",
 *         labels: {},
 *         nodeConfigs: [{
 *             nodeIp: "10.200.0.11",
 *             labels: {},
 *         }],
 *         taints: [{
 *             key: "test-key",
 *             value: "test-value",
 *             effect: "NO_EXECUTE",
 *         }],
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * BareMetalNodePool can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/bareMetalClusters/{{bare_metal_cluster}}/bareMetalNodePools/{{name}}`
 *
 * * `{{project}}/{{location}}/{{bare_metal_cluster}}/{{name}}`
 *
 * * `{{location}}/{{bare_metal_cluster}}/{{name}}`
 *
 * When using the `pulumi import` command, BareMetalNodePool can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:gkeonprem/bareMetalNodePool:BareMetalNodePool default projects/{{project}}/locations/{{location}}/bareMetalClusters/{{bare_metal_cluster}}/bareMetalNodePools/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:gkeonprem/bareMetalNodePool:BareMetalNodePool default {{project}}/{{location}}/{{bare_metal_cluster}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:gkeonprem/bareMetalNodePool:BareMetalNodePool default {{location}}/{{bare_metal_cluster}}/{{name}}
 * ```
 */
class BareMetalNodePool extends pulumi.CustomResource {
    /**
     * Get an existing BareMetalNodePool 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 BareMetalNodePool(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of BareMetalNodePool.  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'] === BareMetalNodePool.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["annotations"] = state?.annotations;
            resourceInputs["bareMetalCluster"] = state?.bareMetalCluster;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["deleteTime"] = state?.deleteTime;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["nodePoolConfig"] = state?.nodePoolConfig;
            resourceInputs["project"] = state?.project;
            resourceInputs["reconciling"] = state?.reconciling;
            resourceInputs["state"] = state?.state;
            resourceInputs["statuses"] = state?.statuses;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.bareMetalCluster === undefined && !opts.urn) {
                throw new Error("Missing required property 'bareMetalCluster'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.nodePoolConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'nodePoolConfig'");
            }
            resourceInputs["annotations"] = args?.annotations;
            resourceInputs["bareMetalCluster"] = args?.bareMetalCluster;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["nodePoolConfig"] = args?.nodePoolConfig;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["deleteTime"] = undefined /*out*/;
            resourceInputs["effectiveAnnotations"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["reconciling"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["statuses"] = undefined /*out*/;
            resourceInputs["uid"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(BareMetalNodePool.__pulumiType, name, resourceInputs, opts);
    }
}
exports.BareMetalNodePool = BareMetalNodePool;
/** @internal */
BareMetalNodePool.__pulumiType = 'gcp:gkeonprem/bareMetalNodePool:BareMetalNodePool';
//# sourceMappingURL=bareMetalNodePool.js.map