"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.WindowsVirtualMachineScaleSet = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Windows Virtual Machine Scale Set.
 *
 * ## Disclaimers
 *
 * > **Note:** This resource will only create Virtual Machine Scale Sets with the **Uniform** Orchestration Mode. For Virtual Machine Scale Sets with **Flexible** orchestration mode, use `azure.compute.OrchestratedVirtualMachineScaleSet`. Flexible orchestration mode is recommended for workloads on Azure.
 *
 * > **Note:** All arguments including the administrator login and password will be stored in the raw state as plain-text. Read more about [sensitive data](https://www.terraform.io/docs/state/sensitive-data.html) in state.
 *
 * > **Note:** This provider will automatically update & reimage the nodes in the Scale Set (if Required) during an Update - this behaviour can be configured using the `features` setting within the Provider block.
 *
 * > **Note:** This resource does not support Unmanaged Disks. If you need to use Unmanaged Disks you can continue to use the `azure.compute.ScaleSet` resource instead.
 *
 * ## Example Usage
 *
 * This example provisions a basic Windows Virtual Machine Scale Set on an internal network.
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "example-network",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     addressSpaces: ["10.0.0.0/16"],
 * });
 * const internal = new azure.network.Subnet("internal", {
 *     name: "internal",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.2.0/24"],
 * });
 * const exampleWindowsVirtualMachineScaleSet = new azure.compute.WindowsVirtualMachineScaleSet("example", {
 *     name: "example-vmss",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     sku: "Standard_F2",
 *     instances: 1,
 *     adminPassword: "P@55w0rd1234!",
 *     adminUsername: "adminuser",
 *     computerNamePrefix: "vm-",
 *     sourceImageReference: {
 *         publisher: "MicrosoftWindowsServer",
 *         offer: "WindowsServer",
 *         sku: "2016-Datacenter-Server-Core",
 *         version: "latest",
 *     },
 *     osDisk: {
 *         storageAccountType: "Standard_LRS",
 *         caching: "ReadWrite",
 *     },
 *     networkInterfaces: [{
 *         name: "example",
 *         primary: true,
 *         ipConfigurations: [{
 *             name: "internal",
 *             primary: true,
 *             subnetId: internal.id,
 *         }],
 *     }],
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Compute` - 2024-11-01
 *
 * ## Import
 *
 * Windows Virtual Machine Scale Sets can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:compute/windowsVirtualMachineScaleSet:WindowsVirtualMachineScaleSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleset1
 * ```
 */
class WindowsVirtualMachineScaleSet extends pulumi.CustomResource {
    /**
     * Get an existing WindowsVirtualMachineScaleSet 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 WindowsVirtualMachineScaleSet(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:compute/windowsVirtualMachineScaleSet:WindowsVirtualMachineScaleSet';
    /**
     * Returns true if the given object is an instance of WindowsVirtualMachineScaleSet.  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'] === WindowsVirtualMachineScaleSet.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["additionalCapabilities"] = state?.additionalCapabilities;
            resourceInputs["additionalUnattendContents"] = state?.additionalUnattendContents;
            resourceInputs["adminPassword"] = state?.adminPassword;
            resourceInputs["adminUsername"] = state?.adminUsername;
            resourceInputs["automaticInstanceRepair"] = state?.automaticInstanceRepair;
            resourceInputs["automaticOsUpgradePolicy"] = state?.automaticOsUpgradePolicy;
            resourceInputs["bootDiagnostics"] = state?.bootDiagnostics;
            resourceInputs["capacityReservationGroupId"] = state?.capacityReservationGroupId;
            resourceInputs["computerNamePrefix"] = state?.computerNamePrefix;
            resourceInputs["customData"] = state?.customData;
            resourceInputs["dataDisks"] = state?.dataDisks;
            resourceInputs["doNotRunExtensionsOnOverprovisionedMachines"] = state?.doNotRunExtensionsOnOverprovisionedMachines;
            resourceInputs["edgeZone"] = state?.edgeZone;
            resourceInputs["enableAutomaticUpdates"] = state?.enableAutomaticUpdates;
            resourceInputs["encryptionAtHostEnabled"] = state?.encryptionAtHostEnabled;
            resourceInputs["evictionPolicy"] = state?.evictionPolicy;
            resourceInputs["extensionOperationsEnabled"] = state?.extensionOperationsEnabled;
            resourceInputs["extensions"] = state?.extensions;
            resourceInputs["extensionsTimeBudget"] = state?.extensionsTimeBudget;
            resourceInputs["galleryApplications"] = state?.galleryApplications;
            resourceInputs["healthProbeId"] = state?.healthProbeId;
            resourceInputs["hostGroupId"] = state?.hostGroupId;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["instances"] = state?.instances;
            resourceInputs["licenseType"] = state?.licenseType;
            resourceInputs["location"] = state?.location;
            resourceInputs["maxBidPrice"] = state?.maxBidPrice;
            resourceInputs["name"] = state?.name;
            resourceInputs["networkInterfaces"] = state?.networkInterfaces;
            resourceInputs["osDisk"] = state?.osDisk;
            resourceInputs["overprovision"] = state?.overprovision;
            resourceInputs["plan"] = state?.plan;
            resourceInputs["platformFaultDomainCount"] = state?.platformFaultDomainCount;
            resourceInputs["priority"] = state?.priority;
            resourceInputs["provisionVmAgent"] = state?.provisionVmAgent;
            resourceInputs["proximityPlacementGroupId"] = state?.proximityPlacementGroupId;
            resourceInputs["resilientVmCreationEnabled"] = state?.resilientVmCreationEnabled;
            resourceInputs["resilientVmDeletionEnabled"] = state?.resilientVmDeletionEnabled;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["rollingUpgradePolicy"] = state?.rollingUpgradePolicy;
            resourceInputs["scaleIn"] = state?.scaleIn;
            resourceInputs["secrets"] = state?.secrets;
            resourceInputs["secureBootEnabled"] = state?.secureBootEnabled;
            resourceInputs["singlePlacementGroup"] = state?.singlePlacementGroup;
            resourceInputs["sku"] = state?.sku;
            resourceInputs["sourceImageId"] = state?.sourceImageId;
            resourceInputs["sourceImageReference"] = state?.sourceImageReference;
            resourceInputs["spotRestore"] = state?.spotRestore;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["terminationNotification"] = state?.terminationNotification;
            resourceInputs["timezone"] = state?.timezone;
            resourceInputs["uniqueId"] = state?.uniqueId;
            resourceInputs["upgradeMode"] = state?.upgradeMode;
            resourceInputs["userData"] = state?.userData;
            resourceInputs["vtpmEnabled"] = state?.vtpmEnabled;
            resourceInputs["winrmListeners"] = state?.winrmListeners;
            resourceInputs["zoneBalance"] = state?.zoneBalance;
            resourceInputs["zones"] = state?.zones;
        }
        else {
            const args = argsOrState;
            if (args?.adminPassword === undefined && !opts.urn) {
                throw new Error("Missing required property 'adminPassword'");
            }
            if (args?.adminUsername === undefined && !opts.urn) {
                throw new Error("Missing required property 'adminUsername'");
            }
            if (args?.instances === undefined && !opts.urn) {
                throw new Error("Missing required property 'instances'");
            }
            if (args?.networkInterfaces === undefined && !opts.urn) {
                throw new Error("Missing required property 'networkInterfaces'");
            }
            if (args?.osDisk === undefined && !opts.urn) {
                throw new Error("Missing required property 'osDisk'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.sku === undefined && !opts.urn) {
                throw new Error("Missing required property 'sku'");
            }
            resourceInputs["additionalCapabilities"] = args?.additionalCapabilities;
            resourceInputs["additionalUnattendContents"] = args?.additionalUnattendContents;
            resourceInputs["adminPassword"] = args?.adminPassword ? pulumi.secret(args.adminPassword) : undefined;
            resourceInputs["adminUsername"] = args?.adminUsername;
            resourceInputs["automaticInstanceRepair"] = args?.automaticInstanceRepair;
            resourceInputs["automaticOsUpgradePolicy"] = args?.automaticOsUpgradePolicy;
            resourceInputs["bootDiagnostics"] = args?.bootDiagnostics;
            resourceInputs["capacityReservationGroupId"] = args?.capacityReservationGroupId;
            resourceInputs["computerNamePrefix"] = args?.computerNamePrefix;
            resourceInputs["customData"] = args?.customData ? pulumi.secret(args.customData) : undefined;
            resourceInputs["dataDisks"] = args?.dataDisks;
            resourceInputs["doNotRunExtensionsOnOverprovisionedMachines"] = args?.doNotRunExtensionsOnOverprovisionedMachines;
            resourceInputs["edgeZone"] = args?.edgeZone;
            resourceInputs["enableAutomaticUpdates"] = args?.enableAutomaticUpdates;
            resourceInputs["encryptionAtHostEnabled"] = args?.encryptionAtHostEnabled;
            resourceInputs["evictionPolicy"] = args?.evictionPolicy;
            resourceInputs["extensionOperationsEnabled"] = args?.extensionOperationsEnabled;
            resourceInputs["extensions"] = args?.extensions;
            resourceInputs["extensionsTimeBudget"] = args?.extensionsTimeBudget;
            resourceInputs["galleryApplications"] = args?.galleryApplications;
            resourceInputs["healthProbeId"] = args?.healthProbeId;
            resourceInputs["hostGroupId"] = args?.hostGroupId;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["instances"] = args?.instances;
            resourceInputs["licenseType"] = args?.licenseType;
            resourceInputs["location"] = args?.location;
            resourceInputs["maxBidPrice"] = args?.maxBidPrice;
            resourceInputs["name"] = args?.name;
            resourceInputs["networkInterfaces"] = args?.networkInterfaces;
            resourceInputs["osDisk"] = args?.osDisk;
            resourceInputs["overprovision"] = args?.overprovision;
            resourceInputs["plan"] = args?.plan;
            resourceInputs["platformFaultDomainCount"] = args?.platformFaultDomainCount;
            resourceInputs["priority"] = args?.priority;
            resourceInputs["provisionVmAgent"] = args?.provisionVmAgent;
            resourceInputs["proximityPlacementGroupId"] = args?.proximityPlacementGroupId;
            resourceInputs["resilientVmCreationEnabled"] = args?.resilientVmCreationEnabled;
            resourceInputs["resilientVmDeletionEnabled"] = args?.resilientVmDeletionEnabled;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["rollingUpgradePolicy"] = args?.rollingUpgradePolicy;
            resourceInputs["scaleIn"] = args?.scaleIn;
            resourceInputs["secrets"] = args?.secrets;
            resourceInputs["secureBootEnabled"] = args?.secureBootEnabled;
            resourceInputs["singlePlacementGroup"] = args?.singlePlacementGroup;
            resourceInputs["sku"] = args?.sku;
            resourceInputs["sourceImageId"] = args?.sourceImageId;
            resourceInputs["sourceImageReference"] = args?.sourceImageReference;
            resourceInputs["spotRestore"] = args?.spotRestore;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["terminationNotification"] = args?.terminationNotification;
            resourceInputs["timezone"] = args?.timezone;
            resourceInputs["upgradeMode"] = args?.upgradeMode;
            resourceInputs["userData"] = args?.userData;
            resourceInputs["vtpmEnabled"] = args?.vtpmEnabled;
            resourceInputs["winrmListeners"] = args?.winrmListeners;
            resourceInputs["zoneBalance"] = args?.zoneBalance;
            resourceInputs["zones"] = args?.zones;
            resourceInputs["uniqueId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["adminPassword", "customData"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(WindowsVirtualMachineScaleSet.__pulumiType, name, resourceInputs, opts);
    }
}
exports.WindowsVirtualMachineScaleSet = WindowsVirtualMachineScaleSet;
//# sourceMappingURL=windowsVirtualMachineScaleSet.js.map