"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Sddc = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Sddc resource in Oracle Cloud Infrastructure Oracle Cloud VMware Solution service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/vmware/latest/Sddc
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/ocvp
 *
 * Creates an Oracle Cloud VMware Solution software-defined data center (SDDC).
 *
 * Use the [WorkRequest](https://docs.cloud.oracle.com/iaas/api/#/en/vmware/20230701/WorkRequest/) operations to track the
 * creation of the SDDC.
 *
 * **Important:** You must configure the SDDC's networking resources with the security rules detailed in [Security Rules for Oracle Cloud VMware Solution SDDCs](https://docs.cloud.oracle.com/iaas/Content/VMware/Reference/ocvssecurityrules.htm). Otherwise, provisioning the SDDC will fail. The rules are based on the requirements set by VMware.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testSddc = new oci.ocvp.Sddc("test_sddc", {
 *     compartmentId: compartmentId,
 *     initialConfigurations: [{
 *         initialClusterConfigurations: [{
 *             computeAvailabilityDomain: sddcInitialConfigurationInitialClusterConfigurationsComputeAvailabilityDomain,
 *             esxiHostsCount: Number(sddcInitialConfigurationInitialClusterConfigurationsEsxiHostsCount),
 *             networkConfiguration: {
 *                 nsxEdgeVtepVlanId: testVlan.id,
 *                 nsxVtepVlanId: testVlan.id,
 *                 provisioningSubnetId: testSubnet.id,
 *                 vmotionVlanId: testVlan.id,
 *                 vsanVlanId: testVlan.id,
 *                 hcxVlanId: testVlan.id,
 *                 nsxEdgeUplink1vlanId: testNsxEdgeUplink1vlan.id,
 *                 nsxEdgeUplink2vlanId: testNsxEdgeUplink2vlan.id,
 *                 provisioningVlanId: testVlan.id,
 *                 replicationVlanId: testVlan.id,
 *                 vsphereVlanId: testVlan.id,
 *             },
 *             vsphereType: sddcInitialConfigurationInitialClusterConfigurationsVsphereType,
 *             capacityReservationId: testCapacityReservation.id,
 *             clusterByolAllocationDetails: {
 *                 firewallByolAllocationId: testByolAllocation.id,
 *                 vsanByolAllocationId: testByolAllocation.id,
 *             },
 *             datastoreClusterIds: sddcInitialConfigurationInitialClusterConfigurationsDatastoreClusterIds,
 *             datastores: [{
 *                 blockVolumeIds: sddcInitialConfigurationInitialClusterConfigurationsDatastoresBlockVolumeIds,
 *                 datastoreType: sddcInitialConfigurationInitialClusterConfigurationsDatastoresDatastoreType,
 *             }],
 *             displayName: sddcInitialConfigurationInitialClusterConfigurationsDisplayName,
 *             initialCommitment: sddcInitialConfigurationInitialClusterConfigurationsInitialCommitment,
 *             initialHostOcpuCount: sddcInitialConfigurationInitialClusterConfigurationsInitialHostOcpuCount,
 *             initialHostShapeName: testShape.name,
 *             initialVcfByolAllocationId: testByolAllocation.id,
 *             instanceDisplayNamePrefix: sddcInitialConfigurationInitialClusterConfigurationsInstanceDisplayNamePrefix,
 *             isShieldedInstanceEnabled: sddcInitialConfigurationInitialClusterConfigurationsIsShieldedInstanceEnabled === "true",
 *             workloadNetworkCidr: sddcInitialConfigurationInitialClusterConfigurationsWorkloadNetworkCidr,
 *         }],
 *     }],
 *     sshAuthorizedKeys: sddcSshAuthorizedKeys,
 *     vmwareSoftwareVersion: sddcVmwareSoftwareVersion,
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     displayName: sddcDisplayName,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     isSingleHostSddc: sddcIsSingleHostSddc === "true",
 *     sddcByolAllocationDetails: {
 *         loadBalancerByolAllocationId: testByolAllocation.id,
 *         loadBalancerInstanceCount: Number(sddcSddcByolAllocationDetailsLoadBalancerInstanceCount),
 *     },
 *     hcxAction: hcxAction,
 *     isHcxEnabled: sddcIsHcxEnabled === "true",
 * });
 * ```
 *
 * ## How to migrate from deprecated fields to new fields
 *
 * 1. Before starting migration, back up your terraform state file.
 * 2. Get the SDDC OCID for the `oci.Ocvp.Sddc` resource you plan to migrate.
 * 3. Remove the `oci.Ocvp.Sddc` resource from Terraform state via command: terraform state rm \<resource address\>
 * 4. Update `oci.Ocvp.Sddc` resource config. Remove all deprecated fields and add corresponding new fields to the resource config. Note: Remove and do not add `hcxAction` or `refreshHcxLicenseStatus` because these fields will not be imported.
 * 5. Import `oci.Ocvp.Sddc` resource to Terraform state using command: terraform import \<resource address\> \<SDDC OCID\>.
 * 6. Run `pulumi preview` to check if there is any planned change for `oci.Ocvp.Sddc` resource. If there is any planned change, update `oci.Ocvp.Sddc` resource config until there is no planned change.
 *
 * ## Import
 *
 * Sddcs can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Ocvp/sddc:Sddc test_sddc "id"
 * ```
 */
class Sddc extends pulumi.CustomResource {
    /**
     * Get an existing Sddc 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 Sddc(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Ocvp/sddc:Sddc';
    /**
     * Returns true if the given object is an instance of Sddc.  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'] === Sddc.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["actualEsxiHostsCount"] = state?.actualEsxiHostsCount;
            resourceInputs["capacityReservationId"] = state?.capacityReservationId;
            resourceInputs["clustersCount"] = state?.clustersCount;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["computeAvailabilityDomain"] = state?.computeAvailabilityDomain;
            resourceInputs["datastores"] = state?.datastores;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["esxiHostsCount"] = state?.esxiHostsCount;
            resourceInputs["esxiSoftwareVersion"] = state?.esxiSoftwareVersion;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["hcxAction"] = state?.hcxAction;
            resourceInputs["hcxFqdn"] = state?.hcxFqdn;
            resourceInputs["hcxInitialPassword"] = state?.hcxInitialPassword;
            resourceInputs["hcxMode"] = state?.hcxMode;
            resourceInputs["hcxOnPremKey"] = state?.hcxOnPremKey;
            resourceInputs["hcxOnPremLicenses"] = state?.hcxOnPremLicenses;
            resourceInputs["hcxPrivateIpId"] = state?.hcxPrivateIpId;
            resourceInputs["hcxVlanId"] = state?.hcxVlanId;
            resourceInputs["initialConfigurations"] = state?.initialConfigurations;
            resourceInputs["initialHostOcpuCount"] = state?.initialHostOcpuCount;
            resourceInputs["initialHostShapeName"] = state?.initialHostShapeName;
            resourceInputs["initialSku"] = state?.initialSku;
            resourceInputs["instanceDisplayNamePrefix"] = state?.instanceDisplayNamePrefix;
            resourceInputs["isHcxEnabled"] = state?.isHcxEnabled;
            resourceInputs["isHcxEnterpriseEnabled"] = state?.isHcxEnterpriseEnabled;
            resourceInputs["isHcxPendingDowngrade"] = state?.isHcxPendingDowngrade;
            resourceInputs["isShieldedInstanceEnabled"] = state?.isShieldedInstanceEnabled;
            resourceInputs["isSingleHostSddc"] = state?.isSingleHostSddc;
            resourceInputs["nsxEdgeUplink1vlanId"] = state?.nsxEdgeUplink1vlanId;
            resourceInputs["nsxEdgeUplink2vlanId"] = state?.nsxEdgeUplink2vlanId;
            resourceInputs["nsxEdgeUplinkIpId"] = state?.nsxEdgeUplinkIpId;
            resourceInputs["nsxEdgeVtepVlanId"] = state?.nsxEdgeVtepVlanId;
            resourceInputs["nsxManagerFqdn"] = state?.nsxManagerFqdn;
            resourceInputs["nsxManagerInitialPassword"] = state?.nsxManagerInitialPassword;
            resourceInputs["nsxManagerPrivateIpId"] = state?.nsxManagerPrivateIpId;
            resourceInputs["nsxManagerUsername"] = state?.nsxManagerUsername;
            resourceInputs["nsxOverlaySegmentName"] = state?.nsxOverlaySegmentName;
            resourceInputs["nsxVtepVlanId"] = state?.nsxVtepVlanId;
            resourceInputs["provisioningSubnetId"] = state?.provisioningSubnetId;
            resourceInputs["provisioningVlanId"] = state?.provisioningVlanId;
            resourceInputs["refreshHcxLicenseStatus"] = state?.refreshHcxLicenseStatus;
            resourceInputs["replicationVlanId"] = state?.replicationVlanId;
            resourceInputs["reservingHcxOnPremiseLicenseKeys"] = state?.reservingHcxOnPremiseLicenseKeys;
            resourceInputs["sddcByolAllocationDetails"] = state?.sddcByolAllocationDetails;
            resourceInputs["sshAuthorizedKeys"] = state?.sshAuthorizedKeys;
            resourceInputs["state"] = state?.state;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeHcxBillingCycleEnd"] = state?.timeHcxBillingCycleEnd;
            resourceInputs["timeHcxLicenseStatusUpdated"] = state?.timeHcxLicenseStatusUpdated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["upgradeLicenses"] = state?.upgradeLicenses;
            resourceInputs["vcenterFqdn"] = state?.vcenterFqdn;
            resourceInputs["vcenterInitialPassword"] = state?.vcenterInitialPassword;
            resourceInputs["vcenterPrivateIpId"] = state?.vcenterPrivateIpId;
            resourceInputs["vcenterUsername"] = state?.vcenterUsername;
            resourceInputs["vmotionVlanId"] = state?.vmotionVlanId;
            resourceInputs["vmwareSoftwareVersion"] = state?.vmwareSoftwareVersion;
            resourceInputs["vsanVlanId"] = state?.vsanVlanId;
            resourceInputs["vsphereUpgradeGuide"] = state?.vsphereUpgradeGuide;
            resourceInputs["vsphereUpgradeObjects"] = state?.vsphereUpgradeObjects;
            resourceInputs["vsphereVlanId"] = state?.vsphereVlanId;
            resourceInputs["workloadNetworkCidr"] = state?.workloadNetworkCidr;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.sshAuthorizedKeys === undefined && !opts.urn) {
                throw new Error("Missing required property 'sshAuthorizedKeys'");
            }
            if (args?.vmwareSoftwareVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'vmwareSoftwareVersion'");
            }
            resourceInputs["capacityReservationId"] = args?.capacityReservationId;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["computeAvailabilityDomain"] = args?.computeAvailabilityDomain;
            resourceInputs["datastores"] = args?.datastores;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["esxiHostsCount"] = args?.esxiHostsCount;
            resourceInputs["esxiSoftwareVersion"] = args?.esxiSoftwareVersion;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["hcxAction"] = args?.hcxAction;
            resourceInputs["hcxVlanId"] = args?.hcxVlanId;
            resourceInputs["initialConfigurations"] = args?.initialConfigurations;
            resourceInputs["initialHostOcpuCount"] = args?.initialHostOcpuCount;
            resourceInputs["initialHostShapeName"] = args?.initialHostShapeName;
            resourceInputs["initialSku"] = args?.initialSku;
            resourceInputs["instanceDisplayNamePrefix"] = args?.instanceDisplayNamePrefix;
            resourceInputs["isHcxEnabled"] = args?.isHcxEnabled;
            resourceInputs["isShieldedInstanceEnabled"] = args?.isShieldedInstanceEnabled;
            resourceInputs["isSingleHostSddc"] = args?.isSingleHostSddc;
            resourceInputs["nsxEdgeUplink1vlanId"] = args?.nsxEdgeUplink1vlanId;
            resourceInputs["nsxEdgeUplink2vlanId"] = args?.nsxEdgeUplink2vlanId;
            resourceInputs["nsxEdgeVtepVlanId"] = args?.nsxEdgeVtepVlanId;
            resourceInputs["nsxVtepVlanId"] = args?.nsxVtepVlanId;
            resourceInputs["provisioningSubnetId"] = args?.provisioningSubnetId;
            resourceInputs["provisioningVlanId"] = args?.provisioningVlanId;
            resourceInputs["refreshHcxLicenseStatus"] = args?.refreshHcxLicenseStatus;
            resourceInputs["replicationVlanId"] = args?.replicationVlanId;
            resourceInputs["reservingHcxOnPremiseLicenseKeys"] = args?.reservingHcxOnPremiseLicenseKeys;
            resourceInputs["sddcByolAllocationDetails"] = args?.sddcByolAllocationDetails;
            resourceInputs["sshAuthorizedKeys"] = args?.sshAuthorizedKeys;
            resourceInputs["vmotionVlanId"] = args?.vmotionVlanId;
            resourceInputs["vmwareSoftwareVersion"] = args?.vmwareSoftwareVersion;
            resourceInputs["vsanVlanId"] = args?.vsanVlanId;
            resourceInputs["vsphereVlanId"] = args?.vsphereVlanId;
            resourceInputs["workloadNetworkCidr"] = args?.workloadNetworkCidr;
            resourceInputs["actualEsxiHostsCount"] = undefined /*out*/;
            resourceInputs["clustersCount"] = undefined /*out*/;
            resourceInputs["hcxFqdn"] = undefined /*out*/;
            resourceInputs["hcxInitialPassword"] = undefined /*out*/;
            resourceInputs["hcxMode"] = undefined /*out*/;
            resourceInputs["hcxOnPremKey"] = undefined /*out*/;
            resourceInputs["hcxOnPremLicenses"] = undefined /*out*/;
            resourceInputs["hcxPrivateIpId"] = undefined /*out*/;
            resourceInputs["isHcxEnterpriseEnabled"] = undefined /*out*/;
            resourceInputs["isHcxPendingDowngrade"] = undefined /*out*/;
            resourceInputs["nsxEdgeUplinkIpId"] = undefined /*out*/;
            resourceInputs["nsxManagerFqdn"] = undefined /*out*/;
            resourceInputs["nsxManagerInitialPassword"] = undefined /*out*/;
            resourceInputs["nsxManagerPrivateIpId"] = undefined /*out*/;
            resourceInputs["nsxManagerUsername"] = undefined /*out*/;
            resourceInputs["nsxOverlaySegmentName"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeHcxBillingCycleEnd"] = undefined /*out*/;
            resourceInputs["timeHcxLicenseStatusUpdated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
            resourceInputs["upgradeLicenses"] = undefined /*out*/;
            resourceInputs["vcenterFqdn"] = undefined /*out*/;
            resourceInputs["vcenterInitialPassword"] = undefined /*out*/;
            resourceInputs["vcenterPrivateIpId"] = undefined /*out*/;
            resourceInputs["vcenterUsername"] = undefined /*out*/;
            resourceInputs["vsphereUpgradeGuide"] = undefined /*out*/;
            resourceInputs["vsphereUpgradeObjects"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Sddc.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Sddc = Sddc;
//# sourceMappingURL=sddc.js.map