"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.CloudVmCluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A CloudVmCluster resource.
 *
 * To get more information about CloudVmCluster, see:
 *
 * * [API documentation](https://cloud.google.com/oracle/database/docs/reference/rest/v1/projects.locations.cloudVmClusters)
 * * How-to Guides
 *     * [Create VM clusters](https://cloud.google.com/oracle/database/docs/create-clusters)
 *
 * ## Example Usage
 *
 * ### Oracledatabase Cloud Vmcluster Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cloudExadataInfrastructures = new gcp.oracledatabase.CloudExadataInfrastructure("cloudExadataInfrastructures", {
 *     cloudExadataInfrastructureId: "my-exadata",
 *     displayName: "my-exadata displayname",
 *     location: "us-east4",
 *     project: "my-project",
 *     properties: {
 *         shape: "Exadata.X9M",
 *         computeCount: 2,
 *         storageCount: 3,
 *     },
 *     deletionProtection: true,
 * });
 * const _default = gcp.compute.getNetwork({
 *     name: "new",
 *     project: "my-project",
 * });
 * const myVmcluster = new gcp.oracledatabase.CloudVmCluster("my_vmcluster", {
 *     cloudVmClusterId: "my-instance",
 *     displayName: "my-instance displayname",
 *     location: "us-east4",
 *     project: "my-project",
 *     exadataInfrastructure: cloudExadataInfrastructures.id,
 *     network: _default.then(_default => _default.id),
 *     cidr: "10.5.0.0/24",
 *     backupSubnetCidr: "10.6.0.0/24",
 *     properties: {
 *         licenseType: "LICENSE_INCLUDED",
 *         sshPublicKeys: ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCz1X2744t+6vRLmE5u6nHi6/QWh8bQDgHmd+OIxRQIGA/IWUtCs2FnaCNZcqvZkaeyjk5v0lTA/n+9jvO42Ipib53athrfVG8gRt8fzPL66C6ZqHq+6zZophhrCdfJh/0G4x9xJh5gdMprlaCR1P8yAaVvhBQSKGc4SiIkyMNBcHJ5YTtMQMTfxaB4G1sHZ6SDAY9a6Cq/zNjDwfPapWLsiP4mRhE5SSjJX6l6EYbkm0JeLQg+AbJiNEPvrvDp1wtTxzlPJtIivthmLMThFxK7+DkrYFuLvN5AHUdo9KTDLvHtDCvV70r8v0gafsrKkM/OE9Jtzoo0e1N/5K/ZdyFRbAkFT4QSF3nwpbmBWLf2Evg//YyEuxnz4CwPqFST2mucnrCCGCVWp1vnHZ0y30nM35njLOmWdRDFy5l27pKUTwLp02y3UYiiZyP7d3/u5pKiN4vC27VuvzprSdJxWoAvluOiDeRh+/oeQDowxoT/Oop8DzB9uJmjktXw8jyMW2+Rpg+ENQqeNgF1OGlEzypaWiRskEFlkpLb4v/s3ZDYkL1oW0Nv/J8LTjTOTEaYt2Udjoe9x2xWiGnQixhdChWuG+MaoWffzUgx1tsVj/DBXijR5DjkPkrA1GA98zd3q8GKEaAdcDenJjHhNYSd4+rE9pIsnYn7fo5X/tFfcQH1XQ== nobody@google.com"],
 *         cpuCoreCount: 4,
 *         giVersion: "19.0.0.0",
 *         hostnamePrefix: "hostname1",
 *     },
 *     deletionProtection: true,
 * });
 * ```
 * ### Oracledatabase Cloud Vmcluster Odbnetwork
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cloudExadataInfrastructures = new gcp.oracledatabase.CloudExadataInfrastructure("cloudExadataInfrastructures", {
 *     cloudExadataInfrastructureId: "my-exadata",
 *     displayName: "my-exadata displayname",
 *     location: "europe-west2",
 *     project: "my-project",
 *     properties: {
 *         shape: "Exadata.X9M",
 *         computeCount: 2,
 *         storageCount: 3,
 *     },
 *     deletionProtection: true,
 * });
 * const myVmcluster = new gcp.oracledatabase.CloudVmCluster("my_vmcluster", {
 *     cloudVmClusterId: "my-instance",
 *     displayName: "my-instance displayname",
 *     location: "europe-west2",
 *     project: "my-project",
 *     exadataInfrastructure: cloudExadataInfrastructures.id,
 *     odbNetwork: "projects/my-project/locations/europe-west2/odbNetworks/my-odbnetwork",
 *     odbSubnet: "projects/my-project/locations/europe-west2/odbNetworks/my-odbnetwork/odbSubnets/my-odbsubnet",
 *     backupOdbSubnet: "projects/my-project/locations/europe-west2/odbNetworks/my-odbnetwork/odbSubnets/my-backup-odbsubnet",
 *     properties: {
 *         licenseType: "LICENSE_INCLUDED",
 *         sshPublicKeys: ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCz1X2744t+6vRLmE5u6nHi6/QWh8bQDgHmd+OIxRQIGA/IWUtCs2FnaCNZcqvZkaeyjk5v0lTA/n+9jvO42Ipib53athrfVG8gRt8fzPL66C6ZqHq+6zZophhrCdfJh/0G4x9xJh5gdMprlaCR1P8yAaVvhBQSKGc4SiIkyMNBcHJ5YTtMQMTfxaB4G1sHZ6SDAY9a6Cq/zNjDwfPapWLsiP4mRhE5SSjJX6l6EYbkm0JeLQg+AbJiNEPvrvDp1wtTxzlPJtIivthmLMThFxK7+DkrYFuLvN5AHUdo9KTDLvHtDCvV70r8v0gafsrKkM/OE9Jtzoo0e1N/5K/ZdyFRbAkFT4QSF3nwpbmBWLf2Evg//YyEuxnz4CwPqFST2mucnrCCGCVWp1vnHZ0y30nM35njLOmWdRDFy5l27pKUTwLp02y3UYiiZyP7d3/u5pKiN4vC27VuvzprSdJxWoAvluOiDeRh+/oeQDowxoT/Oop8DzB9uJmjktXw8jyMW2+Rpg+ENQqeNgF1OGlEzypaWiRskEFlkpLb4v/s3ZDYkL1oW0Nv/J8LTjTOTEaYt2Udjoe9x2xWiGnQixhdChWuG+MaoWffzUgx1tsVj/DBXijR5DjkPkrA1GA98zd3q8GKEaAdcDenJjHhNYSd4+rE9pIsnYn7fo5X/tFfcQH1XQ== nobody@google.com"],
 *         cpuCoreCount: 4,
 *         giVersion: "19.0.0.0",
 *         hostnamePrefix: "hostname1",
 *     },
 *     deletionProtection: true,
 * });
 * ```
 * ### Oracledatabase Cloud Vmcluster Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cloudExadataInfrastructures = new gcp.oracledatabase.CloudExadataInfrastructure("cloudExadataInfrastructures", {
 *     cloudExadataInfrastructureId: "my-exadata",
 *     displayName: "my-exadata displayname",
 *     location: "us-east4",
 *     project: "my-project",
 *     properties: {
 *         shape: "Exadata.X9M",
 *         computeCount: 2,
 *         storageCount: 3,
 *     },
 *     deletionProtection: true,
 * });
 * const _default = gcp.compute.getNetwork({
 *     name: "new",
 *     project: "my-project",
 * });
 * const mydbserver = gcp.oracledatabase.getDbServersOutput({
 *     location: "us-east4",
 *     project: "my-project",
 *     cloudExadataInfrastructure: cloudExadataInfrastructures.cloudExadataInfrastructureId,
 * });
 * const myVmcluster = new gcp.oracledatabase.CloudVmCluster("my_vmcluster", {
 *     cloudVmClusterId: "my-instance",
 *     displayName: "my-instance displayname",
 *     location: "us-east4",
 *     project: "my-project",
 *     exadataInfrastructure: cloudExadataInfrastructures.id,
 *     network: _default.then(_default => _default.id),
 *     cidr: "10.5.0.0/24",
 *     backupSubnetCidr: "10.6.0.0/24",
 *     labels: {
 *         "label-one": "value-one",
 *     },
 *     properties: {
 *         licenseType: "LICENSE_INCLUDED",
 *         sshPublicKeys: ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCz1X2744t+6vRLmE5u6nHi6/QWh8bQDgHmd+OIxRQIGA/IWUtCs2FnaCNZcqvZkaeyjk5v0lTA/n+9jvO42Ipib53athrfVG8gRt8fzPL66C6ZqHq+6zZophhrCdfJh/0G4x9xJh5gdMprlaCR1P8yAaVvhBQSKGc4SiIkyMNBcHJ5YTtMQMTfxaB4G1sHZ6SDAY9a6Cq/zNjDwfPapWLsiP4mRhE5SSjJX6l6EYbkm0JeLQg+AbJiNEPvrvDp1wtTxzlPJtIivthmLMThFxK7+DkrYFuLvN5AHUdo9KTDLvHtDCvV70r8v0gafsrKkM/OE9Jtzoo0e1N/5K/ZdyFRbAkFT4QSF3nwpbmBWLf2Evg//YyEuxnz4CwPqFST2mucnrCCGCVWp1vnHZ0y30nM35njLOmWdRDFy5l27pKUTwLp02y3UYiiZyP7d3/u5pKiN4vC27VuvzprSdJxWoAvluOiDeRh+/oeQDowxoT/Oop8DzB9uJmjktXw8jyMW2+Rpg+ENQqeNgF1OGlEzypaWiRskEFlkpLb4v/s3ZDYkL1oW0Nv/J8LTjTOTEaYt2Udjoe9x2xWiGnQixhdChWuG+MaoWffzUgx1tsVj/DBXijR5DjkPkrA1GA98zd3q8GKEaAdcDenJjHhNYSd4+rE9pIsnYn7fo5X/tFfcQH1XQ== nobody@google.com"],
 *         cpuCoreCount: 4,
 *         giVersion: "19.0.0.0",
 *         timeZone: {
 *             id: "UTC",
 *         },
 *         nodeCount: 2,
 *         ocpuCount: 4,
 *         dataStorageSizeTb: 2,
 *         dbNodeStorageSizeGb: 120,
 *         dbServerOcids: [
 *             mydbserver.apply(mydbserver => mydbserver.dbServers?.[0]?.properties?.[0]?.ocid),
 *             mydbserver.apply(mydbserver => mydbserver.dbServers?.[1]?.properties?.[0]?.ocid),
 *         ],
 *         diskRedundancy: "HIGH",
 *         sparseDiskgroupEnabled: false,
 *         localBackupEnabled: false,
 *         clusterName: "pq-ppat4",
 *         hostnamePrefix: "hostname1",
 *         diagnosticsDataCollectionOptions: {
 *             diagnosticsEventsEnabled: true,
 *             healthMonitoringEnabled: true,
 *             incidentLogsEnabled: true,
 *         },
 *         memorySizeGb: 60,
 *     },
 *     deletionProtection: true,
 * });
 * ```
 *
 * ## Import
 *
 * CloudVmCluster can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/cloudVmClusters/{{cloud_vm_cluster_id}}`
 *
 * * `{{project}}/{{location}}/{{cloud_vm_cluster_id}}`
 *
 * * `{{location}}/{{cloud_vm_cluster_id}}`
 *
 * When using the `pulumi import` command, CloudVmCluster can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:oracledatabase/cloudVmCluster:CloudVmCluster default projects/{{project}}/locations/{{location}}/cloudVmClusters/{{cloud_vm_cluster_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:oracledatabase/cloudVmCluster:CloudVmCluster default {{project}}/{{location}}/{{cloud_vm_cluster_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:oracledatabase/cloudVmCluster:CloudVmCluster default {{location}}/{{cloud_vm_cluster_id}}
 * ```
 */
class CloudVmCluster extends pulumi.CustomResource {
    /**
     * Get an existing CloudVmCluster 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 CloudVmCluster(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of CloudVmCluster.  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'] === CloudVmCluster.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["backupOdbSubnet"] = state?.backupOdbSubnet;
            resourceInputs["backupSubnetCidr"] = state?.backupSubnetCidr;
            resourceInputs["cidr"] = state?.cidr;
            resourceInputs["cloudVmClusterId"] = state?.cloudVmClusterId;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["deletionProtection"] = state?.deletionProtection;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["exadataInfrastructure"] = state?.exadataInfrastructure;
            resourceInputs["gcpOracleZone"] = state?.gcpOracleZone;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["network"] = state?.network;
            resourceInputs["odbNetwork"] = state?.odbNetwork;
            resourceInputs["odbSubnet"] = state?.odbSubnet;
            resourceInputs["project"] = state?.project;
            resourceInputs["properties"] = state?.properties;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
        }
        else {
            const args = argsOrState;
            if (args?.cloudVmClusterId === undefined && !opts.urn) {
                throw new Error("Missing required property 'cloudVmClusterId'");
            }
            if (args?.exadataInfrastructure === undefined && !opts.urn) {
                throw new Error("Missing required property 'exadataInfrastructure'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["backupOdbSubnet"] = args?.backupOdbSubnet;
            resourceInputs["backupSubnetCidr"] = args?.backupSubnetCidr;
            resourceInputs["cidr"] = args?.cidr;
            resourceInputs["cloudVmClusterId"] = args?.cloudVmClusterId;
            resourceInputs["deletionProtection"] = args?.deletionProtection;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["exadataInfrastructure"] = args?.exadataInfrastructure;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["network"] = args?.network;
            resourceInputs["odbNetwork"] = args?.odbNetwork;
            resourceInputs["odbSubnet"] = args?.odbSubnet;
            resourceInputs["project"] = args?.project;
            resourceInputs["properties"] = args?.properties;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["gcpOracleZone"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(CloudVmCluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CloudVmCluster = CloudVmCluster;
/** @internal */
CloudVmCluster.__pulumiType = 'gcp:oracledatabase/cloudVmCluster:CloudVmCluster';
//# sourceMappingURL=cloudVmCluster.js.map