"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.Instance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ## subcategory: "Cloud Bigtable"
 *
 * description: |-
 *   Creates a Google Bigtable instance.
 * ---
 *
 * # gcp.bigtable.Instance
 *
 * Creates a Google Bigtable instance. For more information see:
 *
 * * [API documentation](https://cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/bigtable/docs)
 *
 * ## Example Usage
 *
 * ### Simple Instance
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const production_instance = new gcp.bigtable.Instance("production-instance", {
 *     name: "tf-instance",
 *     clusters: [{
 *         clusterId: "tf-instance-cluster",
 *         numNodes: 1,
 *         storageType: "HDD",
 *     }],
 *     labels: {
 *         "my-label": "prod-label",
 *     },
 * });
 * ```
 *
 * ### Replicated Instance
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const production_instance = new gcp.bigtable.Instance("production-instance", {
 *     name: "tf-instance",
 *     clusters: [
 *         {
 *             clusterId: "tf-instance-cluster1",
 *             numNodes: 1,
 *             storageType: "HDD",
 *             zone: "us-central1-c",
 *         },
 *         {
 *             clusterId: "tf-instance-cluster2",
 *             storageType: "HDD",
 *             zone: "us-central1-b",
 *             autoscalingConfig: {
 *                 minNodes: 1,
 *                 maxNodes: 3,
 *                 cpuTarget: 50,
 *             },
 *         },
 *     ],
 *     labels: {
 *         "my-label": "prod-label",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Bigtable Instances can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/instances/{{name}}`
 *
 * * `{{project}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, Bigtable Instances can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:bigtable/instance:Instance default projects/{{project}}/instances/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:bigtable/instance:Instance default {{project}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:bigtable/instance:Instance default {{name}}
 * ```
 */
class Instance extends pulumi.CustomResource {
    /**
     * Get an existing Instance 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 Instance(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Instance.  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'] === Instance.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["clusters"] = state?.clusters;
            resourceInputs["deletionProtection"] = state?.deletionProtection;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["forceDestroy"] = state?.forceDestroy;
            resourceInputs["instanceType"] = state?.instanceType;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
        }
        else {
            const args = argsOrState;
            resourceInputs["clusters"] = args?.clusters;
            resourceInputs["deletionProtection"] = args?.deletionProtection;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["forceDestroy"] = args?.forceDestroy;
            resourceInputs["instanceType"] = args?.instanceType;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Instance.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Instance = Instance;
/** @internal */
Instance.__pulumiType = 'gcp:bigtable/instance:Instance';
//# sourceMappingURL=instance.js.map