"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.Cluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A cluster in a private cloud.
 *
 * To get more information about Cluster, see:
 *
 * * [API documentation](https://cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.privateClouds.clusters)
 *
 * ## Example Usage
 *
 * ### Vmware Engine Cluster Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cluster_nw = new gcp.vmwareengine.Network("cluster-nw", {
 *     name: "pc-nw",
 *     type: "STANDARD",
 *     location: "global",
 *     description: "PC network description.",
 * });
 * const cluster_pc = new gcp.vmwareengine.PrivateCloud("cluster-pc", {
 *     location: "us-west1-a",
 *     name: "sample-pc",
 *     description: "Sample test PC.",
 *     networkConfig: {
 *         managementCidr: "192.168.30.0/24",
 *         vmwareEngineNetwork: cluster_nw.id,
 *     },
 *     managementCluster: {
 *         clusterId: "sample-mgmt-cluster",
 *         nodeTypeConfigs: [{
 *             nodeTypeId: "standard-72",
 *             nodeCount: 3,
 *         }],
 *     },
 * });
 * const vmw_engine_ext_cluster = new gcp.vmwareengine.Cluster("vmw-engine-ext-cluster", {
 *     name: "ext-cluster",
 *     parent: cluster_pc.id,
 *     nodeTypeConfigs: [{
 *         nodeTypeId: "standard-72",
 *         nodeCount: 3,
 *     }],
 * });
 * ```
 * ### Vmware Engine Cluster Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cluster_nw = new gcp.vmwareengine.Network("cluster-nw", {
 *     name: "pc-nw",
 *     type: "STANDARD",
 *     location: "global",
 *     description: "PC network description.",
 * });
 * const cluster_pc = new gcp.vmwareengine.PrivateCloud("cluster-pc", {
 *     location: "us-west1-a",
 *     name: "sample-pc",
 *     description: "Sample test PC.",
 *     networkConfig: {
 *         managementCidr: "192.168.30.0/24",
 *         vmwareEngineNetwork: cluster_nw.id,
 *     },
 *     managementCluster: {
 *         clusterId: "sample-mgmt-cluster",
 *         nodeTypeConfigs: [{
 *             nodeTypeId: "standard-72",
 *             nodeCount: 3,
 *             customCoreCount: 32,
 *         }],
 *     },
 * });
 * const vmw_ext_cluster = new gcp.vmwareengine.Cluster("vmw-ext-cluster", {
 *     name: "ext-cluster",
 *     parent: cluster_pc.id,
 *     nodeTypeConfigs: [{
 *         nodeTypeId: "standard-72",
 *         nodeCount: 3,
 *         customCoreCount: 32,
 *     }],
 *     autoscalingSettings: {
 *         autoscalingPolicies: [{
 *             autoscalePolicyId: "autoscaling-policy",
 *             nodeTypeId: "standard-72",
 *             scaleOutSize: 1,
 *             cpuThresholds: {
 *                 scaleOut: 80,
 *                 scaleIn: 15,
 *             },
 *             consumedMemoryThresholds: {
 *                 scaleOut: 75,
 *                 scaleIn: 20,
 *             },
 *             storageThresholds: {
 *                 scaleOut: 80,
 *                 scaleIn: 20,
 *             },
 *         }],
 *         minClusterNodeCount: 3,
 *         maxClusterNodeCount: 8,
 *         coolDownPeriod: "1800s",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Cluster can be imported using any of these accepted formats:
 *
 * * `{{parent}}/clusters/{{name}}`
 *
 * When using the `pulumi import` command, Cluster can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:vmwareengine/cluster:Cluster default {{parent}}/clusters/{{name}}
 * ```
 */
class Cluster extends pulumi.CustomResource {
    /**
     * Get an existing Cluster 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 Cluster(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Cluster.  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'] === Cluster.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["autoscalingSettings"] = state?.autoscalingSettings;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["management"] = state?.management;
            resourceInputs["name"] = state?.name;
            resourceInputs["nodeTypeConfigs"] = state?.nodeTypeConfigs;
            resourceInputs["parent"] = state?.parent;
            resourceInputs["state"] = state?.state;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.parent === undefined && !opts.urn) {
                throw new Error("Missing required property 'parent'");
            }
            resourceInputs["autoscalingSettings"] = args?.autoscalingSettings;
            resourceInputs["name"] = args?.name;
            resourceInputs["nodeTypeConfigs"] = args?.nodeTypeConfigs;
            resourceInputs["parent"] = args?.parent;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["management"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["uid"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Cluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Cluster = Cluster;
/** @internal */
Cluster.__pulumiType = 'gcp:vmwareengine/cluster:Cluster';
//# sourceMappingURL=cluster.js.map