"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");
/**
 * A Google Cloud Looker instance.
 *
 * To get more information about Instance, see:
 *
 * * [API documentation](https://cloud.google.com/looker/docs/reference/rest/v1/projects.locations.instances)
 * * How-to Guides
 *     * [Configure a Looker (Google Cloud core) instance](https://cloud.google.com/looker/docs/looker-core-instance-setup)
 *     * [Create a Looker (Google Cloud core) instance](https://cloud.google.com/looker/docs/looker-core-instance-create)
 *
 * ## Example Usage
 *
 * ### Looker Instance Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const looker_instance = new gcp.looker.Instance("looker-instance", {
 *     name: "my-instance",
 *     platformEdition: "LOOKER_CORE_STANDARD_ANNUAL",
 *     region: "us-central1",
 *     oauthConfig: {
 *         clientId: "my-client-id",
 *         clientSecret: "my-client-secret",
 *     },
 *     deletionPolicy: "DEFAULT",
 * });
 * ```
 * ### Looker Instance Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const looker_instance = new gcp.looker.Instance("looker-instance", {
 *     name: "my-instance",
 *     platformEdition: "LOOKER_CORE_STANDARD_ANNUAL",
 *     region: "us-central1",
 *     publicIpEnabled: true,
 *     geminiEnabled: true,
 *     adminSettings: {
 *         allowedEmailDomains: ["google.com"],
 *     },
 *     maintenanceWindow: {
 *         dayOfWeek: "THURSDAY",
 *         startTime: {
 *             hours: 22,
 *             minutes: 0,
 *             seconds: 0,
 *             nanos: 0,
 *         },
 *     },
 *     denyMaintenancePeriod: {
 *         startDate: {
 *             year: 2050,
 *             month: 1,
 *             day: 1,
 *         },
 *         endDate: {
 *             year: 2050,
 *             month: 2,
 *             day: 1,
 *         },
 *         time: {
 *             hours: 10,
 *             minutes: 0,
 *             seconds: 0,
 *             nanos: 0,
 *         },
 *     },
 *     oauthConfig: {
 *         clientId: "my-client-id",
 *         clientSecret: "my-client-secret",
 *     },
 * });
 * ```
 * ### Looker Instance Fips
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const looker_instance = new gcp.looker.Instance("looker-instance", {
 *     name: "my-instance-fips",
 *     platformEdition: "LOOKER_CORE_ENTERPRISE_ANNUAL",
 *     region: "us-central1",
 *     publicIpEnabled: true,
 *     fipsEnabled: true,
 *     oauthConfig: {
 *         clientId: "my-client-id",
 *         clientSecret: "my-client-secret",
 *     },
 * });
 * ```
 * ### Looker Instance Enterprise Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const lookerNetwork = new gcp.compute.Network("looker_network", {name: "looker-network"});
 * const lookerRange = new gcp.compute.GlobalAddress("looker_range", {
 *     name: "looker-range",
 *     purpose: "VPC_PEERING",
 *     addressType: "INTERNAL",
 *     prefixLength: 20,
 *     network: lookerNetwork.id,
 * });
 * const lookerVpcConnection = new gcp.servicenetworking.Connection("looker_vpc_connection", {
 *     network: lookerNetwork.id,
 *     service: "servicenetworking.googleapis.com",
 *     reservedPeeringRanges: [lookerRange.name],
 * });
 * const looker_instance = new gcp.looker.Instance("looker-instance", {
 *     name: "my-instance",
 *     platformEdition: "LOOKER_CORE_ENTERPRISE_ANNUAL",
 *     region: "us-central1",
 *     privateIpEnabled: true,
 *     publicIpEnabled: false,
 *     geminiEnabled: true,
 *     reservedRange: lookerRange.name,
 *     consumerNetwork: lookerNetwork.id,
 *     adminSettings: {
 *         allowedEmailDomains: ["google.com"],
 *     },
 *     encryptionConfig: {
 *         kmsKeyName: "looker-kms-key",
 *     },
 *     maintenanceWindow: {
 *         dayOfWeek: "THURSDAY",
 *         startTime: {
 *             hours: 22,
 *             minutes: 0,
 *             seconds: 0,
 *             nanos: 0,
 *         },
 *     },
 *     denyMaintenancePeriod: {
 *         startDate: {
 *             year: 2050,
 *             month: 1,
 *             day: 1,
 *         },
 *         endDate: {
 *             year: 2050,
 *             month: 2,
 *             day: 1,
 *         },
 *         time: {
 *             hours: 10,
 *             minutes: 0,
 *             seconds: 0,
 *             nanos: 0,
 *         },
 *     },
 *     oauthConfig: {
 *         clientId: "my-client-id",
 *         clientSecret: "my-client-secret",
 *     },
 * }, {
 *     dependsOn: [lookerVpcConnection],
 * });
 * const project = gcp.organizations.getProject({});
 * const cryptoKey = new gcp.kms.CryptoKeyIAMMember("crypto_key", {
 *     cryptoKeyId: "looker-kms-key",
 *     role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-looker.iam.gserviceaccount.com`),
 * });
 * ```
 * ### Looker Instance Custom Domain
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const looker_instance = new gcp.looker.Instance("looker-instance", {
 *     name: "my-instance",
 *     platformEdition: "LOOKER_CORE_STANDARD_ANNUAL",
 *     region: "us-central1",
 *     oauthConfig: {
 *         clientId: "my-client-id",
 *         clientSecret: "my-client-secret",
 *     },
 *     customDomain: {
 *         domain: "my-custom-domain.com",
 *     },
 * });
 * ```
 * ### Looker Instance Psc
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const looker_instance = new gcp.looker.Instance("looker-instance", {
 *     name: "my-instance",
 *     platformEdition: "LOOKER_CORE_ENTERPRISE_ANNUAL",
 *     region: "us-central1",
 *     privateIpEnabled: false,
 *     publicIpEnabled: false,
 *     pscEnabled: true,
 *     oauthConfig: {
 *         clientId: "my-client-id",
 *         clientSecret: "my-client-secret",
 *     },
 *     pscConfig: {
 *         allowedVpcs: ["projects/test-project/global/networks/test"],
 *     },
 * });
 * ```
 * ### Looker Instance Force Delete
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const looker_instance = new gcp.looker.Instance("looker-instance", {
 *     name: "my-instance",
 *     platformEdition: "LOOKER_CORE_STANDARD_ANNUAL",
 *     region: "us-central1",
 *     oauthConfig: {
 *         clientId: "my-client-id",
 *         clientSecret: "my-client-secret",
 *     },
 *     deletionPolicy: "FORCE",
 * });
 * ```
 *
 * ## Import
 *
 * Instance can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{region}}/instances/{{name}}`
 *
 * * `{{project}}/{{region}}/{{name}}`
 *
 * * `{{region}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, Instance can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:looker/instance:Instance default projects/{{project}}/locations/{{region}}/instances/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:looker/instance:Instance default {{project}}/{{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:looker/instance:Instance default {{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:looker/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["adminSettings"] = state?.adminSettings;
            resourceInputs["consumerNetwork"] = state?.consumerNetwork;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["customDomain"] = state?.customDomain;
            resourceInputs["deletionPolicy"] = state?.deletionPolicy;
            resourceInputs["denyMaintenancePeriod"] = state?.denyMaintenancePeriod;
            resourceInputs["egressPublicIp"] = state?.egressPublicIp;
            resourceInputs["encryptionConfig"] = state?.encryptionConfig;
            resourceInputs["fipsEnabled"] = state?.fipsEnabled;
            resourceInputs["geminiEnabled"] = state?.geminiEnabled;
            resourceInputs["ingressPrivateIp"] = state?.ingressPrivateIp;
            resourceInputs["ingressPublicIp"] = state?.ingressPublicIp;
            resourceInputs["lookerUri"] = state?.lookerUri;
            resourceInputs["lookerVersion"] = state?.lookerVersion;
            resourceInputs["maintenanceWindow"] = state?.maintenanceWindow;
            resourceInputs["name"] = state?.name;
            resourceInputs["oauthConfig"] = state?.oauthConfig;
            resourceInputs["platformEdition"] = state?.platformEdition;
            resourceInputs["privateIpEnabled"] = state?.privateIpEnabled;
            resourceInputs["project"] = state?.project;
            resourceInputs["pscConfig"] = state?.pscConfig;
            resourceInputs["pscEnabled"] = state?.pscEnabled;
            resourceInputs["publicIpEnabled"] = state?.publicIpEnabled;
            resourceInputs["region"] = state?.region;
            resourceInputs["reservedRange"] = state?.reservedRange;
            resourceInputs["updateTime"] = state?.updateTime;
            resourceInputs["userMetadata"] = state?.userMetadata;
        }
        else {
            const args = argsOrState;
            if (args?.oauthConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'oauthConfig'");
            }
            resourceInputs["adminSettings"] = args?.adminSettings;
            resourceInputs["consumerNetwork"] = args?.consumerNetwork;
            resourceInputs["customDomain"] = args?.customDomain;
            resourceInputs["deletionPolicy"] = args?.deletionPolicy;
            resourceInputs["denyMaintenancePeriod"] = args?.denyMaintenancePeriod;
            resourceInputs["encryptionConfig"] = args?.encryptionConfig;
            resourceInputs["fipsEnabled"] = args?.fipsEnabled;
            resourceInputs["geminiEnabled"] = args?.geminiEnabled;
            resourceInputs["maintenanceWindow"] = args?.maintenanceWindow;
            resourceInputs["name"] = args?.name;
            resourceInputs["oauthConfig"] = args?.oauthConfig;
            resourceInputs["platformEdition"] = args?.platformEdition;
            resourceInputs["privateIpEnabled"] = args?.privateIpEnabled;
            resourceInputs["project"] = args?.project;
            resourceInputs["pscConfig"] = args?.pscConfig;
            resourceInputs["pscEnabled"] = args?.pscEnabled;
            resourceInputs["publicIpEnabled"] = args?.publicIpEnabled;
            resourceInputs["region"] = args?.region;
            resourceInputs["reservedRange"] = args?.reservedRange;
            resourceInputs["userMetadata"] = args?.userMetadata;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["egressPublicIp"] = undefined /*out*/;
            resourceInputs["ingressPrivateIp"] = undefined /*out*/;
            resourceInputs["ingressPublicIp"] = undefined /*out*/;
            resourceInputs["lookerUri"] = undefined /*out*/;
            resourceInputs["lookerVersion"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Instance.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Instance = Instance;
/** @internal */
Instance.__pulumiType = 'gcp:looker/instance:Instance';
//# sourceMappingURL=instance.js.map