"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");
/**
 * Cluster contains information about a Google Distributed Cloud Edge Kubernetes cluster.
 *
 * To get more information about Cluster, see:
 *
 * * [API documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/container/rest/v1/projects.locations.clusters)
 * * How-to Guides
 *     * [Create and manage clusters](https://cloud.google.com/distributed-cloud/edge/latest/docs/clusters)
 *
 * ## Example Usage
 *
 * ### Edgecontainer Local Control Plane Cluster
 *
 * ```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: "local-control-plane-cluster",
 *     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",
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Cluster can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/clusters/{{name}}`
 *
 * * `{{project}}/{{location}}/{{name}}`
 *
 * * `{{location}}/{{name}}`
 *
 * When using the `pulumi import` command, Cluster can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:edgecontainer/cluster:Cluster default projects/{{project}}/locations/{{location}}/clusters/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:edgecontainer/cluster:Cluster default {{project}}/{{location}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:edgecontainer/cluster:Cluster default {{location}}/{{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["authorization"] = state?.authorization;
            resourceInputs["clusterCaCertificate"] = state?.clusterCaCertificate;
            resourceInputs["controlPlane"] = state?.controlPlane;
            resourceInputs["controlPlaneEncryption"] = state?.controlPlaneEncryption;
            resourceInputs["controlPlaneVersion"] = state?.controlPlaneVersion;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["defaultMaxPodsPerNode"] = state?.defaultMaxPodsPerNode;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["endpoint"] = state?.endpoint;
            resourceInputs["externalLoadBalancerIpv4AddressPools"] = state?.externalLoadBalancerIpv4AddressPools;
            resourceInputs["fleet"] = state?.fleet;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["maintenanceEvents"] = state?.maintenanceEvents;
            resourceInputs["maintenancePolicy"] = state?.maintenancePolicy;
            resourceInputs["name"] = state?.name;
            resourceInputs["networking"] = state?.networking;
            resourceInputs["nodeVersion"] = state?.nodeVersion;
            resourceInputs["port"] = state?.port;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["releaseChannel"] = state?.releaseChannel;
            resourceInputs["status"] = state?.status;
            resourceInputs["systemAddonsConfig"] = state?.systemAddonsConfig;
            resourceInputs["targetVersion"] = state?.targetVersion;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.authorization === undefined && !opts.urn) {
                throw new Error("Missing required property 'authorization'");
            }
            if (args?.fleet === undefined && !opts.urn) {
                throw new Error("Missing required property 'fleet'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.networking === undefined && !opts.urn) {
                throw new Error("Missing required property 'networking'");
            }
            resourceInputs["authorization"] = args?.authorization;
            resourceInputs["controlPlane"] = args?.controlPlane;
            resourceInputs["controlPlaneEncryption"] = args?.controlPlaneEncryption;
            resourceInputs["defaultMaxPodsPerNode"] = args?.defaultMaxPodsPerNode;
            resourceInputs["externalLoadBalancerIpv4AddressPools"] = args?.externalLoadBalancerIpv4AddressPools;
            resourceInputs["fleet"] = args?.fleet;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["maintenancePolicy"] = args?.maintenancePolicy;
            resourceInputs["name"] = args?.name;
            resourceInputs["networking"] = args?.networking;
            resourceInputs["project"] = args?.project;
            resourceInputs["releaseChannel"] = args?.releaseChannel;
            resourceInputs["systemAddonsConfig"] = args?.systemAddonsConfig;
            resourceInputs["targetVersion"] = args?.targetVersion;
            resourceInputs["clusterCaCertificate"] = undefined /*out*/;
            resourceInputs["controlPlaneVersion"] = undefined /*out*/;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["endpoint"] = undefined /*out*/;
            resourceInputs["maintenanceEvents"] = undefined /*out*/;
            resourceInputs["nodeVersion"] = undefined /*out*/;
            resourceInputs["port"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["clusterCaCertificate", "effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Cluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Cluster = Cluster;
/** @internal */
Cluster.__pulumiType = 'gcp:edgecontainer/cluster:Cluster';
//# sourceMappingURL=cluster.js.map