"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.LinuxVirtualMachineScaleSet = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Linux Virtual Machine Scale Set.
 *
 * ## Disclaimers
 *
 * > **Note:** As of the **v2.86.0** (November 19, 2021) release of the provider 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.
 *
 * ## Example Usage
 *
 * This example provisions a basic Linux Virtual Machine Scale Set on an internal network.
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const firstPublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com";
 * 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 exampleLinuxVirtualMachineScaleSet = new azure.compute.LinuxVirtualMachineScaleSet("example", {
 *     name: "example-vmss",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     sku: "Standard_F2",
 *     instances: 1,
 *     adminUsername: "adminuser",
 *     adminSshKeys: [{
 *         username: "adminuser",
 *         publicKey: firstPublicKey,
 *     }],
 *     sourceImageReference: {
 *         publisher: "Canonical",
 *         offer: "0001-com-ubuntu-server-jammy",
 *         sku: "22_04-lts",
 *         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
 *
 * Linux Virtual Machine Scale Sets can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:compute/linuxVirtualMachineScaleSet:LinuxVirtualMachineScaleSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleset1
 * ```
 */
class LinuxVirtualMachineScaleSet extends pulumi.CustomResource {
    /**
     * Get an existing LinuxVirtualMachineScaleSet 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 LinuxVirtualMachineScaleSet(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:compute/linuxVirtualMachineScaleSet:LinuxVirtualMachineScaleSet';
    /**
     * Returns true if the given object is an instance of LinuxVirtualMachineScaleSet.  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'] === LinuxVirtualMachineScaleSet.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["additionalCapabilities"] = state?.additionalCapabilities;
            resourceInputs["adminPassword"] = state?.adminPassword;
            resourceInputs["adminSshKeys"] = state?.adminSshKeys;
            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["disablePasswordAuthentication"] = state?.disablePasswordAuthentication;
            resourceInputs["doNotRunExtensionsOnOverprovisionedMachines"] = state?.doNotRunExtensionsOnOverprovisionedMachines;
            resourceInputs["edgeZone"] = state?.edgeZone;
            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["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["uniqueId"] = state?.uniqueId;
            resourceInputs["upgradeMode"] = state?.upgradeMode;
            resourceInputs["userData"] = state?.userData;
            resourceInputs["vtpmEnabled"] = state?.vtpmEnabled;
            resourceInputs["zoneBalance"] = state?.zoneBalance;
            resourceInputs["zones"] = state?.zones;
        }
        else {
            const args = argsOrState;
            if (args?.adminUsername === undefined && !opts.urn) {
                throw new Error("Missing required property 'adminUsername'");
            }
            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["adminPassword"] = args?.adminPassword ? pulumi.secret(args.adminPassword) : undefined;
            resourceInputs["adminSshKeys"] = args?.adminSshKeys;
            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["disablePasswordAuthentication"] = args?.disablePasswordAuthentication;
            resourceInputs["doNotRunExtensionsOnOverprovisionedMachines"] = args?.doNotRunExtensionsOnOverprovisionedMachines;
            resourceInputs["edgeZone"] = args?.edgeZone;
            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["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["upgradeMode"] = args?.upgradeMode;
            resourceInputs["userData"] = args?.userData;
            resourceInputs["vtpmEnabled"] = args?.vtpmEnabled;
            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(LinuxVirtualMachineScaleSet.__pulumiType, name, resourceInputs, opts);
    }
}
exports.LinuxVirtualMachineScaleSet = LinuxVirtualMachineScaleSet;
//# sourceMappingURL=linuxVirtualMachineScaleSet.js.map