"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.WorkstationConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A set of configuration options describing how a workstation will be run. Workstation configurations are intended to be shared across multiple workstations.
 *
 * To get more information about WorkstationConfig, see:
 *
 * * [API documentation](https://cloud.google.com/workstations/docs/reference/rest/v1beta/projects.locations.workstationClusters.workstationConfigs/create)
 * * How-to Guides
 *     * [Workstations](https://cloud.google.com/workstations/docs/)
 *
 * ## Example Usage
 *
 * ### Workstation Config Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const tagKey1 = new gcp.tags.TagKey("tag_key1", {
 *     parent: "organizations/123456789",
 *     shortName: "keyname",
 * });
 * const tagValue1 = new gcp.tags.TagValue("tag_value1", {
 *     parent: tagKey1.id,
 *     shortName: "valuename",
 * });
 * const _default = 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: _default.name,
 * });
 * const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: _default.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
 *     workstationConfigId: "workstation-config",
 *     workstationClusterId: defaultWorkstationCluster.workstationClusterId,
 *     location: "us-central1",
 *     idleTimeout: "600s",
 *     runningTimeout: "21600s",
 *     replicaZones: [
 *         "us-central1-a",
 *         "us-central1-b",
 *     ],
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 *     labels: {
 *         label: "key",
 *     },
 *     maxUsableWorkstations: 1,
 *     host: {
 *         gceInstance: {
 *             machineType: "e2-standard-4",
 *             bootDiskSizeGb: 35,
 *             disablePublicIpAddresses: true,
 *             disableSsh: false,
 *             vmTags: pulumi.all([tagKey1.id, tagValue1.id]).apply(([tagKey1Id, tagValue1Id]) => {
 *                 [tagKey1Id]: tagValue1Id,
 *             }),
 *         },
 *     },
 * });
 * ```
 * ### Workstation Config Container
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = 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: _default.name,
 * });
 * const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: _default.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
 *     workstationConfigId: "workstation-config",
 *     workstationClusterId: defaultWorkstationCluster.workstationClusterId,
 *     location: "us-central1",
 *     host: {
 *         gceInstance: {
 *             machineType: "n1-standard-4",
 *             bootDiskSizeGb: 35,
 *             disablePublicIpAddresses: true,
 *             enableNestedVirtualization: true,
 *         },
 *     },
 *     container: {
 *         image: "intellij",
 *         env: {
 *             NAME: "FOO",
 *             BABE: "bar",
 *         },
 *     },
 * });
 * ```
 * ### Workstation Config Persistent Directories
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = 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: _default.name,
 * });
 * const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: _default.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
 *     workstationConfigId: "workstation-config",
 *     workstationClusterId: defaultWorkstationCluster.workstationClusterId,
 *     location: "us-central1",
 *     host: {
 *         gceInstance: {
 *             machineType: "e2-standard-4",
 *             bootDiskSizeGb: 35,
 *             disablePublicIpAddresses: true,
 *             shieldedInstanceConfig: {
 *                 enableSecureBoot: true,
 *                 enableVtpm: true,
 *             },
 *         },
 *     },
 *     persistentDirectories: [{
 *         mountPath: "/home",
 *         gcePd: {
 *             sizeGb: 200,
 *             fsType: "ext4",
 *             diskType: "pd-standard",
 *             reclaimPolicy: "DELETE",
 *         },
 *     }],
 * });
 * ```
 * ### Workstation Config Source Snapshot
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = 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: _default.name,
 * });
 * const mySourceDisk = new gcp.compute.Disk("my_source_disk", {
 *     name: "workstation-config",
 *     size: 10,
 *     type: "pd-ssd",
 *     zone: "us-central1-a",
 * });
 * const mySourceSnapshot = new gcp.compute.Snapshot("my_source_snapshot", {
 *     name: "workstation-config",
 *     sourceDisk: mySourceDisk.name,
 *     zone: "us-central1-a",
 * });
 * const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: _default.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 * });
 * const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
 *     workstationConfigId: "workstation-config",
 *     workstationClusterId: defaultWorkstationCluster.workstationClusterId,
 *     location: defaultWorkstationCluster.location,
 *     persistentDirectories: [{
 *         mountPath: "/home",
 *         gcePd: {
 *             sourceSnapshot: mySourceSnapshot.id,
 *             reclaimPolicy: "DELETE",
 *         },
 *     }],
 * });
 * ```
 * ### Workstation Config Shielded Instance Config
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = 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: _default.name,
 * });
 * const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: _default.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
 *     workstationConfigId: "workstation-config",
 *     workstationClusterId: defaultWorkstationCluster.workstationClusterId,
 *     location: "us-central1",
 *     host: {
 *         gceInstance: {
 *             machineType: "e2-standard-4",
 *             bootDiskSizeGb: 35,
 *             disablePublicIpAddresses: true,
 *             shieldedInstanceConfig: {
 *                 enableSecureBoot: true,
 *                 enableVtpm: true,
 *             },
 *         },
 *     },
 * });
 * ```
 * ### Workstation Config Accelerators
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = 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: _default.name,
 * });
 * const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: _default.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
 *     workstationConfigId: "workstation-config",
 *     workstationClusterId: defaultWorkstationCluster.workstationClusterId,
 *     location: "us-central1",
 *     host: {
 *         gceInstance: {
 *             machineType: "n1-standard-2",
 *             bootDiskSizeGb: 35,
 *             disablePublicIpAddresses: true,
 *             accelerators: [{
 *                 type: "nvidia-tesla-t4",
 *                 count: 1,
 *             }],
 *         },
 *     },
 * });
 * ```
 * ### Workstation Config Boost
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = 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: _default.name,
 * });
 * const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: _default.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
 *     workstationConfigId: "workstation-config",
 *     workstationClusterId: defaultWorkstationCluster.workstationClusterId,
 *     location: "us-central1",
 *     host: {
 *         gceInstance: {
 *             machineType: "e2-standard-4",
 *             bootDiskSizeGb: 35,
 *             disablePublicIpAddresses: true,
 *             boostConfigs: [
 *                 {
 *                     id: "boost-1",
 *                     machineType: "n1-standard-2",
 *                     accelerators: [{
 *                         type: "nvidia-tesla-t4",
 *                         count: 1,
 *                     }],
 *                 },
 *                 {
 *                     id: "boost-2",
 *                     machineType: "n1-standard-2",
 *                     poolSize: 2,
 *                     bootDiskSizeGb: 30,
 *                     enableNestedVirtualization: true,
 *                 },
 *             ],
 *         },
 *     },
 * });
 * ```
 * ### Workstation Config Encryption Key
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = 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: _default.name,
 * });
 * const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: _default.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const defaultKeyRing = new gcp.kms.KeyRing("default", {
 *     name: "workstation-cluster",
 *     location: "us-central1",
 * });
 * const defaultCryptoKey = new gcp.kms.CryptoKey("default", {
 *     name: "workstation-cluster",
 *     keyRing: defaultKeyRing.id,
 * });
 * const defaultAccount = new gcp.serviceaccount.Account("default", {
 *     accountId: "my-account",
 *     displayName: "Service Account",
 * });
 * const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
 *     workstationConfigId: "workstation-config",
 *     workstationClusterId: defaultWorkstationCluster.workstationClusterId,
 *     location: "us-central1",
 *     host: {
 *         gceInstance: {
 *             machineType: "e2-standard-4",
 *             bootDiskSizeGb: 35,
 *             disablePublicIpAddresses: true,
 *             shieldedInstanceConfig: {
 *                 enableSecureBoot: true,
 *                 enableVtpm: true,
 *             },
 *         },
 *     },
 *     encryptionKey: {
 *         kmsKey: defaultCryptoKey.id,
 *         kmsKeyServiceAccount: defaultAccount.email,
 *     },
 * });
 * ```
 * ### Workstation Config Allowed Ports
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = 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: _default.name,
 * });
 * const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
 *     workstationClusterId: "workstation-cluster",
 *     network: _default.id,
 *     subnetwork: defaultSubnetwork.id,
 *     location: "us-central1",
 *     labels: {
 *         label: "key",
 *     },
 *     annotations: {
 *         "label-one": "value-one",
 *     },
 * });
 * const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
 *     workstationConfigId: "workstation-config",
 *     workstationClusterId: defaultWorkstationCluster.workstationClusterId,
 *     location: "us-central1",
 *     host: {
 *         gceInstance: {
 *             machineType: "e2-standard-4",
 *             bootDiskSizeGb: 35,
 *             disablePublicIpAddresses: true,
 *         },
 *     },
 *     allowedPorts: [
 *         {
 *             first: 80,
 *             last: 80,
 *         },
 *         {
 *             first: 22,
 *             last: 22,
 *         },
 *         {
 *             first: 1024,
 *             last: 65535,
 *         },
 *     ],
 * });
 * ```
 *
 * ## Import
 *
 * WorkstationConfig can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}}/workstationConfigs/{{workstation_config_id}}`
 *
 * * `{{project}}/{{location}}/{{workstation_cluster_id}}/{{workstation_config_id}}`
 *
 * * `{{location}}/{{workstation_cluster_id}}/{{workstation_config_id}}`
 *
 * When using the `pulumi import` command, WorkstationConfig can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:workstations/workstationConfig:WorkstationConfig default projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}}/workstationConfigs/{{workstation_config_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:workstations/workstationConfig:WorkstationConfig default {{project}}/{{location}}/{{workstation_cluster_id}}/{{workstation_config_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:workstations/workstationConfig:WorkstationConfig default {{location}}/{{workstation_cluster_id}}/{{workstation_config_id}}
 * ```
 */
class WorkstationConfig extends pulumi.CustomResource {
    /**
     * Get an existing WorkstationConfig 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 WorkstationConfig(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of WorkstationConfig.  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'] === WorkstationConfig.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["allowedPorts"] = state?.allowedPorts;
            resourceInputs["annotations"] = state?.annotations;
            resourceInputs["conditions"] = state?.conditions;
            resourceInputs["container"] = state?.container;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["degraded"] = state?.degraded;
            resourceInputs["disableTcpConnections"] = state?.disableTcpConnections;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["enableAuditAgent"] = state?.enableAuditAgent;
            resourceInputs["encryptionKey"] = state?.encryptionKey;
            resourceInputs["ephemeralDirectories"] = state?.ephemeralDirectories;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["host"] = state?.host;
            resourceInputs["idleTimeout"] = state?.idleTimeout;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["maxUsableWorkstations"] = state?.maxUsableWorkstations;
            resourceInputs["name"] = state?.name;
            resourceInputs["persistentDirectories"] = state?.persistentDirectories;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["readinessChecks"] = state?.readinessChecks;
            resourceInputs["replicaZones"] = state?.replicaZones;
            resourceInputs["runningTimeout"] = state?.runningTimeout;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["workstationClusterId"] = state?.workstationClusterId;
            resourceInputs["workstationConfigId"] = state?.workstationConfigId;
        }
        else {
            const args = argsOrState;
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.workstationClusterId === undefined && !opts.urn) {
                throw new Error("Missing required property 'workstationClusterId'");
            }
            if (args?.workstationConfigId === undefined && !opts.urn) {
                throw new Error("Missing required property 'workstationConfigId'");
            }
            resourceInputs["allowedPorts"] = args?.allowedPorts;
            resourceInputs["annotations"] = args?.annotations;
            resourceInputs["container"] = args?.container;
            resourceInputs["disableTcpConnections"] = args?.disableTcpConnections;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["enableAuditAgent"] = args?.enableAuditAgent;
            resourceInputs["encryptionKey"] = args?.encryptionKey;
            resourceInputs["ephemeralDirectories"] = args?.ephemeralDirectories;
            resourceInputs["host"] = args?.host;
            resourceInputs["idleTimeout"] = args?.idleTimeout;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["maxUsableWorkstations"] = args?.maxUsableWorkstations;
            resourceInputs["persistentDirectories"] = args?.persistentDirectories;
            resourceInputs["project"] = args?.project;
            resourceInputs["readinessChecks"] = args?.readinessChecks;
            resourceInputs["replicaZones"] = args?.replicaZones;
            resourceInputs["runningTimeout"] = args?.runningTimeout;
            resourceInputs["workstationClusterId"] = args?.workstationClusterId;
            resourceInputs["workstationConfigId"] = args?.workstationConfigId;
            resourceInputs["conditions"] = 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(WorkstationConfig.__pulumiType, name, resourceInputs, opts);
    }
}
exports.WorkstationConfig = WorkstationConfig;
/** @internal */
WorkstationConfig.__pulumiType = 'gcp:workstations/workstationConfig:WorkstationConfig';
//# sourceMappingURL=workstationConfig.js.map