"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.WorkstationCluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A grouping of workstation configurations and the associated workstations in that region.
 *
 * To get more information about WorkstationCluster, see:
 *
 * * [API documentation](https://cloud.google.com/workstations/docs/reference/rest/v1beta/projects.locations.workstationClusters/create)
 * * How-to Guides
 *     * [Workstations](https://cloud.google.com/workstations/docs/)
 *
 * ## Example Usage
 *
 * ### Workstation Cluster Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const defaultNetwork = new gcp.compute.Network("default", {
 *     name: "workstation-cluster",
 *     autoCreateSubnetworks: false,
 * });
 * const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
 *     name: "workstation-cluster",
 *     ipCidrRange: "10.0.0.0/24",
 *     region: "us-central1",
 *     network: defaultNetwork.name,
 * });
 * const _default = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: defaultNetwork.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * ```
 * ### Workstation Cluster Private
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const defaultNetwork = new gcp.compute.Network("default", {
 *     name: "workstation-cluster-private",
 *     autoCreateSubnetworks: false,
 * });
 * const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
 *     name: "workstation-cluster-private",
 *     ipCidrRange: "10.0.0.0/24",
 *     region: "us-central1",
 *     network: defaultNetwork.name,
 * });
 * const _default = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster-private",
 *     network: defaultNetwork.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     privateClusterConfig: {
 *         enablePrivateEndpoint: true,
 *     },
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * ```
 * ### Workstation Cluster Custom Domain
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const defaultNetwork = new gcp.compute.Network("default", {
 *     name: "workstation-cluster-custom-domain",
 *     autoCreateSubnetworks: false,
 * });
 * const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
 *     name: "workstation-cluster-custom-domain",
 *     ipCidrRange: "10.0.0.0/24",
 *     region: "us-central1",
 *     network: defaultNetwork.name,
 * });
 * const _default = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster-custom-domain",
 *     network: defaultNetwork.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     privateClusterConfig: {
 *         enablePrivateEndpoint: true,
 *     },
 *     domainConfig: {
 *         domain: "workstations.example.com",
 *     },
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * ```
 * ### Workstation Cluster Tags
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const project = gcp.organizations.getProject({});
 * const tagKey = new gcp.tags.TagKey("tag_key", {
 *     parent: project.then(project => `projects/${project.number}`),
 *     shortName: "keyname",
 * });
 * const tagValue = new gcp.tags.TagValue("tag_value", {
 *     parent: pulumi.interpolate`tagKeys/${tagKey.name}`,
 *     shortName: "valuename",
 * });
 * const defaultNetwork = new gcp.compute.Network("default", {
 *     name: "workstation-cluster-tags",
 *     autoCreateSubnetworks: false,
 * });
 * const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
 *     name: "workstation-cluster-tags",
 *     ipCidrRange: "10.0.0.0/24",
 *     region: "us-central1",
 *     network: defaultNetwork.name,
 * });
 * const _default = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster-tags",
 *     network: defaultNetwork.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     tags: pulumi.all([project, tagKey.shortName, tagValue.shortName]).apply(([project, tagKeyShortName, tagValueShortName]) => {
 *         [`${project.projectId}/${tagKeyShortName}`]: tagValueShortName,
 *     }),
 * });
 * ```
 *
 * ## Import
 *
 * WorkstationCluster can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}}`
 *
 * * `{{project}}/{{location}}/{{workstation_cluster_id}}`
 *
 * * `{{location}}/{{workstation_cluster_id}}`
 *
 * When using the `pulumi import` command, WorkstationCluster can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:workstations/workstationCluster:WorkstationCluster default projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:workstations/workstationCluster:WorkstationCluster default {{project}}/{{location}}/{{workstation_cluster_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:workstations/workstationCluster:WorkstationCluster default {{location}}/{{workstation_cluster_id}}
 * ```
 */
class WorkstationCluster extends pulumi.CustomResource {
    /**
     * Get an existing WorkstationCluster 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 WorkstationCluster(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of WorkstationCluster.  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'] === WorkstationCluster.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["annotations"] = state?.annotations;
            resourceInputs["conditions"] = state?.conditions;
            resourceInputs["controlPlaneIp"] = state?.controlPlaneIp;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["degraded"] = state?.degraded;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["domainConfig"] = state?.domainConfig;
            resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["network"] = state?.network;
            resourceInputs["privateClusterConfig"] = state?.privateClusterConfig;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["subnetwork"] = state?.subnetwork;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["workstationClusterId"] = state?.workstationClusterId;
        }
        else {
            const args = argsOrState;
            if (args?.network === undefined && !opts.urn) {
                throw new Error("Missing required property 'network'");
            }
            if (args?.subnetwork === undefined && !opts.urn) {
                throw new Error("Missing required property 'subnetwork'");
            }
            if (args?.workstationClusterId === undefined && !opts.urn) {
                throw new Error("Missing required property 'workstationClusterId'");
            }
            resourceInputs["annotations"] = args?.annotations;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["domainConfig"] = args?.domainConfig;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["network"] = args?.network;
            resourceInputs["privateClusterConfig"] = args?.privateClusterConfig;
            resourceInputs["project"] = args?.project;
            resourceInputs["subnetwork"] = args?.subnetwork;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["workstationClusterId"] = args?.workstationClusterId;
            resourceInputs["conditions"] = undefined /*out*/;
            resourceInputs["controlPlaneIp"] = undefined /*out*/;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["degraded"] = undefined /*out*/;
            resourceInputs["effectiveAnnotations"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["uid"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(WorkstationCluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.WorkstationCluster = WorkstationCluster;
/** @internal */
WorkstationCluster.__pulumiType = 'gcp:workstations/workstationCluster:WorkstationCluster';
//# sourceMappingURL=workstationCluster.js.map