1. Packages
  2. Azure Native
  3. API Docs
  4. compute
  5. VirtualMachineScaleSet
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.29.0 published on Friday, Feb 16, 2024 by Pulumi

azure-native.compute.VirtualMachineScaleSet

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.29.0 published on Friday, Feb 16, 2024 by Pulumi

    Describes a Virtual Machine Scale Set. Azure REST API version: 2023-03-01. Prior API version in Azure Native 1.x: 2021-03-01.

    Other available API versions: 2015-06-15, 2016-04-30-preview, 2023-07-01, 2023-09-01.

    Example Usage

    Create a VMSS with an extension that has suppressFailures enabled

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs
                {
                    BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs
                    {
                        Enabled = true,
                        StorageUri = "http://{existing-storage-account-name}.blob.core.windows.net",
                    },
                },
                ExtensionProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionProfileArgs
                {
                    Extensions = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionArgs
                        {
                            AutoUpgradeMinorVersion = false,
                            Name = "{extension-name}",
                            Publisher = "{extension-Publisher}",
                            Settings = null,
                            SuppressFailures = true,
                            Type = "{extension-Type}",
                            TypeHandlerVersion = "{handler-version}",
                        },
                    },
                },
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Offer = "WindowsServer",
                        Publisher = "MicrosoftWindowsServer",
                        Sku = "2016-Datacenter",
                        Version = "latest",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    DiagnosticsProfile: interface{}{
    BootDiagnostics: &compute.BootDiagnosticsArgs{
    Enabled: pulumi.Bool(true),
    StorageUri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net"),
    },
    },
    ExtensionProfile: interface{}{
    Extensions: compute.VirtualMachineScaleSetExtensionTypeArray{
    &compute.VirtualMachineScaleSetExtensionTypeArgs{
    AutoUpgradeMinorVersion: pulumi.Bool(false),
    Name: pulumi.String("{extension-name}"),
    Publisher: pulumi.String("{extension-Publisher}"),
    Settings: nil,
    SuppressFailures: pulumi.Bool(true),
    Type: pulumi.String("{extension-Type}"),
    TypeHandlerVersion: pulumi.String("{handler-version}"),
    },
    },
    },
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Offer: pulumi.String("WindowsServer"),
    Publisher: pulumi.String("MicrosoftWindowsServer"),
    Sku: pulumi.String("2016-Datacenter"),
    Version: pulumi.String("latest"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("diagnosticsProfile", Map.of("bootDiagnostics", Map.ofEntries(
                        Map.entry("enabled", true),
                        Map.entry("storageUri", "http://{existing-storage-account-name}.blob.core.windows.net")
                    ))),
                    Map.entry("extensionProfile", Map.of("extensions", Map.ofEntries(
                        Map.entry("autoUpgradeMinorVersion", false),
                        Map.entry("name", "{extension-name}"),
                        Map.entry("publisher", "{extension-Publisher}"),
                        Map.entry("settings", ),
                        Map.entry("suppressFailures", true),
                        Map.entry("type", "{extension-Type}"),
                        Map.entry("typeHandlerVersion", "{handler-version}")
                    ))),
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.ofEntries(
                            Map.entry("offer", "WindowsServer"),
                            Map.entry("publisher", "MicrosoftWindowsServer"),
                            Map.entry("sku", "2016-Datacenter"),
                            Map.entry("version", "latest")
                        )),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            diagnostics_profile={
                "bootDiagnostics": azure_native.compute.BootDiagnosticsArgs(
                    enabled=True,
                    storage_uri="http://{existing-storage-account-name}.blob.core.windows.net",
                ),
            },
            extension_profile={
                "extensions": [azure_native.compute.VirtualMachineScaleSetExtensionArgs(
                    auto_upgrade_minor_version=False,
                    name="{extension-name}",
                    publisher="{extension-Publisher}",
                    settings={},
                    suppress_failures=True,
                    type="{extension-Type}",
                    type_handler_version="{handler-version}",
                )],
            },
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    offer="WindowsServer",
                    publisher="MicrosoftWindowsServer",
                    sku="2016-Datacenter",
                    version="latest",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            diagnosticsProfile: {
                bootDiagnostics: {
                    enabled: true,
                    storageUri: "http://{existing-storage-account-name}.blob.core.windows.net",
                },
            },
            extensionProfile: {
                extensions: [{
                    autoUpgradeMinorVersion: false,
                    name: "{extension-name}",
                    publisher: "{extension-Publisher}",
                    settings: {},
                    suppressFailures: true,
                    type: "{extension-Type}",
                    typeHandlerVersion: "{handler-version}",
                }],
            },
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                imageReference: {
                    offer: "WindowsServer",
                    publisher: "MicrosoftWindowsServer",
                    sku: "2016-Datacenter",
                    version: "latest",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            diagnosticsProfile:
              bootDiagnostics:
                enabled: true
                storageUri: http://{existing-storage-account-name}.blob.core.windows.net
            extensionProfile:
              extensions:
                - autoUpgradeMinorVersion: false
                  name: '{extension-name}'
                  publisher: '{extension-Publisher}'
                  settings: {}
                  suppressFailures: true
                  type: '{extension-Type}'
                  typeHandlerVersion: '{handler-version}'
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              imageReference:
                offer: WindowsServer
                publisher: MicrosoftWindowsServer
                sku: 2016-Datacenter
                version: latest
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a VMSS with an extension with protectedSettingsFromKeyVault

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs
                {
                    BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs
                    {
                        Enabled = true,
                        StorageUri = "http://{existing-storage-account-name}.blob.core.windows.net",
                    },
                },
                ExtensionProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionProfileArgs
                {
                    Extensions = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionArgs
                        {
                            AutoUpgradeMinorVersion = false,
                            Name = "{extension-name}",
                            ProtectedSettingsFromKeyVault = new AzureNative.Compute.Inputs.KeyVaultSecretReferenceArgs
                            {
                                SecretUrl = "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e",
                                SourceVault = new AzureNative.Compute.Inputs.SubResourceArgs
                                {
                                    Id = "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName",
                                },
                            },
                            Publisher = "{extension-Publisher}",
                            Settings = null,
                            Type = "{extension-Type}",
                            TypeHandlerVersion = "{handler-version}",
                        },
                    },
                },
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Offer = "WindowsServer",
                        Publisher = "MicrosoftWindowsServer",
                        Sku = "2016-Datacenter",
                        Version = "latest",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    DiagnosticsProfile: interface{}{
    BootDiagnostics: &compute.BootDiagnosticsArgs{
    Enabled: pulumi.Bool(true),
    StorageUri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net"),
    },
    },
    ExtensionProfile: interface{}{
    Extensions: compute.VirtualMachineScaleSetExtensionTypeArray{
    interface{}{
    AutoUpgradeMinorVersion: pulumi.Bool(false),
    Name: pulumi.String("{extension-name}"),
    ProtectedSettingsFromKeyVault: interface{}{
    SecretUrl: pulumi.String("https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"),
    SourceVault: &compute.SubResourceArgs{
    Id: pulumi.String("/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"),
    },
    },
    Publisher: pulumi.String("{extension-Publisher}"),
    Settings: nil,
    Type: pulumi.String("{extension-Type}"),
    TypeHandlerVersion: pulumi.String("{handler-version}"),
    },
    },
    },
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Offer: pulumi.String("WindowsServer"),
    Publisher: pulumi.String("MicrosoftWindowsServer"),
    Sku: pulumi.String("2016-Datacenter"),
    Version: pulumi.String("latest"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("diagnosticsProfile", Map.of("bootDiagnostics", Map.ofEntries(
                        Map.entry("enabled", true),
                        Map.entry("storageUri", "http://{existing-storage-account-name}.blob.core.windows.net")
                    ))),
                    Map.entry("extensionProfile", Map.of("extensions", Map.ofEntries(
                        Map.entry("autoUpgradeMinorVersion", false),
                        Map.entry("name", "{extension-name}"),
                        Map.entry("protectedSettingsFromKeyVault", Map.ofEntries(
                            Map.entry("secretUrl", "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"),
                            Map.entry("sourceVault", Map.of("id", "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"))
                        )),
                        Map.entry("publisher", "{extension-Publisher}"),
                        Map.entry("settings", ),
                        Map.entry("type", "{extension-Type}"),
                        Map.entry("typeHandlerVersion", "{handler-version}")
                    ))),
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.ofEntries(
                            Map.entry("offer", "WindowsServer"),
                            Map.entry("publisher", "MicrosoftWindowsServer"),
                            Map.entry("sku", "2016-Datacenter"),
                            Map.entry("version", "latest")
                        )),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            diagnostics_profile={
                "bootDiagnostics": azure_native.compute.BootDiagnosticsArgs(
                    enabled=True,
                    storage_uri="http://{existing-storage-account-name}.blob.core.windows.net",
                ),
            },
            extension_profile={
                "extensions": [{
                    "autoUpgradeMinorVersion": False,
                    "name": "{extension-name}",
                    "protectedSettingsFromKeyVault": {
                        "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e",
                        "sourceVault": azure_native.compute.SubResourceArgs(
                            id="/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName",
                        ),
                    },
                    "publisher": "{extension-Publisher}",
                    "settings": {},
                    "type": "{extension-Type}",
                    "typeHandlerVersion": "{handler-version}",
                }],
            },
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    offer="WindowsServer",
                    publisher="MicrosoftWindowsServer",
                    sku="2016-Datacenter",
                    version="latest",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            diagnosticsProfile: {
                bootDiagnostics: {
                    enabled: true,
                    storageUri: "http://{existing-storage-account-name}.blob.core.windows.net",
                },
            },
            extensionProfile: {
                extensions: [{
                    autoUpgradeMinorVersion: false,
                    name: "{extension-name}",
                    protectedSettingsFromKeyVault: {
                        secretUrl: "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e",
                        sourceVault: {
                            id: "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName",
                        },
                    },
                    publisher: "{extension-Publisher}",
                    settings: {},
                    type: "{extension-Type}",
                    typeHandlerVersion: "{handler-version}",
                }],
            },
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                imageReference: {
                    offer: "WindowsServer",
                    publisher: "MicrosoftWindowsServer",
                    sku: "2016-Datacenter",
                    version: "latest",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            diagnosticsProfile:
              bootDiagnostics:
                enabled: true
                storageUri: http://{existing-storage-account-name}.blob.core.windows.net
            extensionProfile:
              extensions:
                - autoUpgradeMinorVersion: false
                  name: '{extension-name}'
                  protectedSettingsFromKeyVault:
                    secretUrl: https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e
                    sourceVault:
                      id: /subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName
                  publisher: '{extension-Publisher}'
                  settings: {}
                  type: '{extension-Type}'
                  typeHandlerVersion: '{handler-version}'
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              imageReference:
                offer: WindowsServer
                publisher: MicrosoftWindowsServer
                sku: 2016-Datacenter
                version: latest
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a custom-image scale set from an unmanaged generalized os image.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        Image = new AzureNative.Compute.Inputs.VirtualHardDiskArgs
                        {
                            Uri = "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd",
                        },
                        Name = "osDisk",
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    Image: &compute.VirtualHardDiskArgs{
    Uri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd"),
    },
    Name: pulumi.String("osDisk"),
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.of("osDisk", Map.ofEntries(
                        Map.entry("caching", "ReadWrite"),
                        Map.entry("createOption", "FromImage"),
                        Map.entry("image", Map.of("uri", "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd")),
                        Map.entry("name", "osDisk")
                    )))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "image": azure_native.compute.VirtualHardDiskArgs(
                        uri="http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd",
                    ),
                    "name": "osDisk",
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    image: {
                        uri: "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd",
                    },
                    name: "osDisk",
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                image:
                  uri: http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd
                name: osDisk
          vmScaleSetName: '{vmss-name}'
    

    Create a platform-image scale set with unmanaged os disks.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Offer = "WindowsServer",
                        Publisher = "MicrosoftWindowsServer",
                        Sku = "2016-Datacenter",
                        Version = "latest",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        Name = "osDisk",
                        VhdContainers = new[]
                        {
                            "http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer",
                            "http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer",
                            "http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer",
                            "http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer",
                            "http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Offer: pulumi.String("WindowsServer"),
    Publisher: pulumi.String("MicrosoftWindowsServer"),
    Sku: pulumi.String("2016-Datacenter"),
    Version: pulumi.String("latest"),
    },
    OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    Name: pulumi.String("osDisk"),
    VhdContainers: pulumi.StringArray{
    pulumi.String("http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer"),
    pulumi.String("http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer"),
    pulumi.String("http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer"),
    pulumi.String("http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer"),
    pulumi.String("http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.ofEntries(
                            Map.entry("offer", "WindowsServer"),
                            Map.entry("publisher", "MicrosoftWindowsServer"),
                            Map.entry("sku", "2016-Datacenter"),
                            Map.entry("version", "latest")
                        )),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("name", "osDisk"),
                            Map.entry("vhdContainers",                         
                                "http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer",
                                "http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer",
                                "http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer",
                                "http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer",
                                "http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer")
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    offer="WindowsServer",
                    publisher="MicrosoftWindowsServer",
                    sku="2016-Datacenter",
                    version="latest",
                ),
                "osDisk": azure_native.compute.VirtualMachineScaleSetOSDiskArgs(
                    caching=azure_native.compute.CachingTypes.READ_WRITE,
                    create_option="FromImage",
                    name="osDisk",
                    vhd_containers=[
                        "http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer",
                        "http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer",
                        "http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer",
                        "http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer",
                        "http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer",
                    ],
                ),
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                imageReference: {
                    offer: "WindowsServer",
                    publisher: "MicrosoftWindowsServer",
                    sku: "2016-Datacenter",
                    version: "latest",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    name: "osDisk",
                    vhdContainers: [
                        "http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer",
                        "http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer",
                        "http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer",
                        "http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer",
                        "http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer",
                    ],
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              imageReference:
                offer: WindowsServer
                publisher: MicrosoftWindowsServer
                sku: 2016-Datacenter
                version: latest
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                name: osDisk
                vhdContainers:
                  - http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer
                  - http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer
                  - http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer
                  - http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer
                  - http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set from a custom image.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                imageReference: {
                    id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              imageReference:
                id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set from a generalized shared image.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage")),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                imageReference: {
                    id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              imageReference:
                id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set from a specialized shared image.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage")),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            storageProfile: {
                imageReference: {
                    id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            storageProfile:
              imageReference:
                id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set where nic config has DisableTcpStateTracking property

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            DisableTcpStateTracking = true,
                            EnableAcceleratedNetworking = true,
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{nicConfig1-name}",
                            Primary = true,
                        },
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            DisableTcpStateTracking = false,
                            EnableAcceleratedNetworking = false,
                            EnableIPForwarding = false,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{nicConfig2-name}",
                                    Primary = true,
                                    PrivateIPAddressVersion = "IPv4",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}",
                                    },
                                },
                            },
                            Name = "{nicConfig2-name}",
                            Primary = false,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    DisableTcpStateTracking: pulumi.Bool(true),
    EnableAcceleratedNetworking: pulumi.Bool(true),
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{nicConfig1-name}"),
    Primary: pulumi.Bool(true),
    },
    interface{}{
    DisableTcpStateTracking: pulumi.Bool(false),
    EnableAcceleratedNetworking: pulumi.Bool(false),
    EnableIPForwarding: pulumi.Bool(false),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{nicConfig2-name}"),
    Primary: pulumi.Bool(true),
    PrivateIPAddressVersion: pulumi.String("IPv4"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"),
    },
    },
    },
    Name: pulumi.String("{nicConfig2-name}"),
    Primary: pulumi.Bool(false),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations",                 
                        Map.ofEntries(
                            Map.entry("disableTcpStateTracking", true),
                            Map.entry("enableAcceleratedNetworking", true),
                            Map.entry("enableIPForwarding", true),
                            Map.entry("ipConfigurations", Map.ofEntries(
                                Map.entry("name", "{vmss-name}"),
                                Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                            )),
                            Map.entry("name", "{nicConfig1-name}"),
                            Map.entry("primary", true)
                        ),
                        Map.ofEntries(
                            Map.entry("disableTcpStateTracking", false),
                            Map.entry("enableAcceleratedNetworking", false),
                            Map.entry("enableIPForwarding", false),
                            Map.entry("ipConfigurations", Map.ofEntries(
                                Map.entry("name", "{nicConfig2-name}"),
                                Map.entry("primary", true),
                                Map.entry("privateIPAddressVersion", "IPv4"),
                                Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"))
                            )),
                            Map.entry("name", "{nicConfig2-name}"),
                            Map.entry("primary", false)
                        ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [
                    {
                        "disableTcpStateTracking": True,
                        "enableAcceleratedNetworking": True,
                        "enableIPForwarding": True,
                        "ipConfigurations": [{
                            "name": "{vmss-name}",
                            "subnet": azure_native.compute.ApiEntityReferenceArgs(
                                id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                            ),
                        }],
                        "name": "{nicConfig1-name}",
                        "primary": True,
                    },
                    {
                        "disableTcpStateTracking": False,
                        "enableAcceleratedNetworking": False,
                        "enableIPForwarding": False,
                        "ipConfigurations": [{
                            "name": "{nicConfig2-name}",
                            "primary": True,
                            "privateIPAddressVersion": "IPv4",
                            "subnet": azure_native.compute.ApiEntityReferenceArgs(
                                id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}",
                            ),
                        }],
                        "name": "{nicConfig2-name}",
                        "primary": False,
                    },
                ],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [
                    {
                        disableTcpStateTracking: true,
                        enableAcceleratedNetworking: true,
                        enableIPForwarding: true,
                        ipConfigurations: [{
                            name: "{vmss-name}",
                            subnet: {
                                id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                            },
                        }],
                        name: "{nicConfig1-name}",
                        primary: true,
                    },
                    {
                        disableTcpStateTracking: false,
                        enableAcceleratedNetworking: false,
                        enableIPForwarding: false,
                        ipConfigurations: [{
                            name: "{nicConfig2-name}",
                            primary: true,
                            privateIPAddressVersion: "IPv4",
                            subnet: {
                                id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}",
                            },
                        }],
                        name: "{nicConfig2-name}",
                        primary: false,
                    },
                ],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                imageReference: {
                    id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - disableTcpStateTracking: true
                  enableAcceleratedNetworking: true
                  enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{nicConfig1-name}'
                  primary: true
                - disableTcpStateTracking: false
                  enableAcceleratedNetworking: false
                  enableIPForwarding: false
                  ipConfigurations:
                    - name: '{nicConfig2-name}'
                      primary: true
                      privateIPAddressVersion: IPv4
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}
                  name: '{nicConfig2-name}'
                  primary: false
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              imageReference:
                id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set with Application Profile

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                ApplicationProfile = new AzureNative.Compute.Inputs.ApplicationProfileArgs
                {
                    GalleryApplications = new[]
                    {
                        new AzureNative.Compute.Inputs.VMGalleryApplicationArgs
                        {
                            ConfigurationReference = "https://mystorageaccount.blob.core.windows.net/configurations/settings.config",
                            EnableAutomaticUpgrade = false,
                            Order = 1,
                            PackageReferenceId = "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0",
                            Tags = "myTag1",
                            TreatFailureAsDeploymentFailure = true,
                        },
                        new AzureNative.Compute.Inputs.VMGalleryApplicationArgs
                        {
                            PackageReferenceId = "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1",
                        },
                    },
                },
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Offer = "WindowsServer",
                        Publisher = "MicrosoftWindowsServer",
                        Sku = "2016-Datacenter",
                        Version = "latest",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    ApplicationProfile: interface{}{
    GalleryApplications: compute.VMGalleryApplicationArray{
    &compute.VMGalleryApplicationArgs{
    ConfigurationReference: pulumi.String("https://mystorageaccount.blob.core.windows.net/configurations/settings.config"),
    EnableAutomaticUpgrade: pulumi.Bool(false),
    Order: pulumi.Int(1),
    PackageReferenceId: pulumi.String("/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0"),
    Tags: pulumi.String("myTag1"),
    TreatFailureAsDeploymentFailure: pulumi.Bool(true),
    },
    &compute.VMGalleryApplicationArgs{
    PackageReferenceId: pulumi.String("/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1"),
    },
    },
    },
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Offer: pulumi.String("WindowsServer"),
    Publisher: pulumi.String("MicrosoftWindowsServer"),
    Sku: pulumi.String("2016-Datacenter"),
    Version: pulumi.String("latest"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("applicationProfile", Map.of("galleryApplications",                 
                        Map.ofEntries(
                            Map.entry("configurationReference", "https://mystorageaccount.blob.core.windows.net/configurations/settings.config"),
                            Map.entry("enableAutomaticUpgrade", false),
                            Map.entry("order", 1),
                            Map.entry("packageReferenceId", "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0"),
                            Map.entry("tags", "myTag1"),
                            Map.entry("treatFailureAsDeploymentFailure", true)
                        ),
                        Map.of("packageReferenceId", "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1"))),
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.ofEntries(
                            Map.entry("offer", "WindowsServer"),
                            Map.entry("publisher", "MicrosoftWindowsServer"),
                            Map.entry("sku", "2016-Datacenter"),
                            Map.entry("version", "latest")
                        )),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            application_profile={
                "galleryApplications": [
                    azure_native.compute.VMGalleryApplicationArgs(
                        configuration_reference="https://mystorageaccount.blob.core.windows.net/configurations/settings.config",
                        enable_automatic_upgrade=False,
                        order=1,
                        package_reference_id="/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0",
                        tags="myTag1",
                        treat_failure_as_deployment_failure=True,
                    ),
                    azure_native.compute.VMGalleryApplicationArgs(
                        package_reference_id="/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1",
                    ),
                ],
            },
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    offer="WindowsServer",
                    publisher="MicrosoftWindowsServer",
                    sku="2016-Datacenter",
                    version="latest",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            applicationProfile: {
                galleryApplications: [
                    {
                        configurationReference: "https://mystorageaccount.blob.core.windows.net/configurations/settings.config",
                        enableAutomaticUpgrade: false,
                        order: 1,
                        packageReferenceId: "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0",
                        tags: "myTag1",
                        treatFailureAsDeploymentFailure: true,
                    },
                    {
                        packageReferenceId: "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1",
                    },
                ],
            },
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                imageReference: {
                    offer: "WindowsServer",
                    publisher: "MicrosoftWindowsServer",
                    sku: "2016-Datacenter",
                    version: "latest",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            applicationProfile:
              galleryApplications:
                - configurationReference: https://mystorageaccount.blob.core.windows.net/configurations/settings.config
                  enableAutomaticUpgrade: false
                  order: 1
                  packageReferenceId: /subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0
                  tags: myTag1
                  treatFailureAsDeploymentFailure: true
                - packageReferenceId: /subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              imageReference:
                offer: WindowsServer
                publisher: MicrosoftWindowsServer
                sku: 2016-Datacenter
                version: latest
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set with DiskEncryptionSet resource in os disk and data disk.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_DS1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    DataDisks = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetDataDiskArgs
                        {
                            Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                            CreateOption = "Empty",
                            DiskSizeGB = 1023,
                            Lun = 0,
                            ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                            {
                                DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
                                {
                                    Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                                },
                                StorageAccountType = "Standard_LRS",
                            },
                        },
                    },
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
                            {
                                Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                            },
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_DS1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    DataDisks: compute.VirtualMachineScaleSetDataDiskArray{
    interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("Empty"),
    DiskSizeGB: pulumi.Int(1023),
    Lun: pulumi.Int(0),
    ManagedDisk: interface{}{
    DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
    },
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    ImageReference: &compute.ImageReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: interface{}{
    DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
    },
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_DS1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("dataDisks", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "Empty"),
                            Map.entry("diskSizeGB", 1023),
                            Map.entry("lun", 0),
                            Map.entry("managedDisk", Map.ofEntries(
                                Map.entry("diskEncryptionSet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}")),
                                Map.entry("storageAccountType", "Standard_LRS")
                            ))
                        )),
                        Map.entry("imageReference", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.ofEntries(
                                Map.entry("diskEncryptionSet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}")),
                                Map.entry("storageAccountType", "Standard_LRS")
                            ))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_DS1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "dataDisks": [{
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "Empty",
                    "diskSizeGB": 1023,
                    "lun": 0,
                    "managedDisk": {
                        "diskEncryptionSet": azure_native.compute.DiskEncryptionSetParametersArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                        ),
                        "storageAccountType": "Standard_LRS",
                    },
                }],
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": {
                        "diskEncryptionSet": azure_native.compute.DiskEncryptionSetParametersArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                        ),
                        "storageAccountType": "Standard_LRS",
                    },
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_DS1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                dataDisks: [{
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "Empty",
                    diskSizeGB: 1023,
                    lun: 0,
                    managedDisk: {
                        diskEncryptionSet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                        },
                        storageAccountType: "Standard_LRS",
                    },
                }],
                imageReference: {
                    id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        diskEncryptionSet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                        },
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_DS1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              dataDisks:
                - caching: ReadWrite
                  createOption: Empty
                  diskSizeGB: 1023
                  lun: 0
                  managedDisk:
                    diskEncryptionSet:
                      id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}
                    storageAccountType: Standard_LRS
              imageReference:
                id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  diskEncryptionSet:
                    id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set with Fpga Network Interfaces.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableAcceleratedNetworking = false,
                            EnableFpga = true,
                            EnableIPForwarding = false,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{fpgaNic-Name}",
                                    Primary = true,
                                    PrivateIPAddressVersion = "IPv4",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}",
                                    },
                                },
                            },
                            Name = "{fpgaNic-Name}",
                            Primary = false,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    interface{}{
    EnableAcceleratedNetworking: pulumi.Bool(false),
    EnableFpga: pulumi.Bool(true),
    EnableIPForwarding: pulumi.Bool(false),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{fpgaNic-Name}"),
    Primary: pulumi.Bool(true),
    PrivateIPAddressVersion: pulumi.String("IPv4"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{fpgaNic-Name}"),
    Primary: pulumi.Bool(false),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations",                 
                        Map.ofEntries(
                            Map.entry("enableIPForwarding", true),
                            Map.entry("ipConfigurations", Map.ofEntries(
                                Map.entry("name", "{vmss-name}"),
                                Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                            )),
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("primary", true)
                        ),
                        Map.ofEntries(
                            Map.entry("enableAcceleratedNetworking", false),
                            Map.entry("enableFpga", true),
                            Map.entry("enableIPForwarding", false),
                            Map.entry("ipConfigurations", Map.ofEntries(
                                Map.entry("name", "{fpgaNic-Name}"),
                                Map.entry("primary", true),
                                Map.entry("privateIPAddressVersion", "IPv4"),
                                Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}"))
                            )),
                            Map.entry("name", "{fpgaNic-Name}"),
                            Map.entry("primary", false)
                        ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [
                    {
                        "enableIPForwarding": True,
                        "ipConfigurations": [{
                            "name": "{vmss-name}",
                            "subnet": azure_native.compute.ApiEntityReferenceArgs(
                                id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                            ),
                        }],
                        "name": "{vmss-name}",
                        "primary": True,
                    },
                    {
                        "enableAcceleratedNetworking": False,
                        "enableFpga": True,
                        "enableIPForwarding": False,
                        "ipConfigurations": [{
                            "name": "{fpgaNic-Name}",
                            "primary": True,
                            "privateIPAddressVersion": "IPv4",
                            "subnet": azure_native.compute.ApiEntityReferenceArgs(
                                id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}",
                            ),
                        }],
                        "name": "{fpgaNic-Name}",
                        "primary": False,
                    },
                ],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [
                    {
                        enableIPForwarding: true,
                        ipConfigurations: [{
                            name: "{vmss-name}",
                            subnet: {
                                id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                            },
                        }],
                        name: "{vmss-name}",
                        primary: true,
                    },
                    {
                        enableAcceleratedNetworking: false,
                        enableFpga: true,
                        enableIPForwarding: false,
                        ipConfigurations: [{
                            name: "{fpgaNic-Name}",
                            primary: true,
                            privateIPAddressVersion: "IPv4",
                            subnet: {
                                id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}",
                            },
                        }],
                        name: "{fpgaNic-Name}",
                        primary: false,
                    },
                ],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            storageProfile: {
                imageReference: {
                    id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
                - enableAcceleratedNetworking: false
                  enableFpga: true
                  enableIPForwarding: false
                  ipConfigurations:
                    - name: '{fpgaNic-Name}'
                      primary: true
                      privateIPAddressVersion: IPv4
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}
                  name: '{fpgaNic-Name}'
                  primary: false
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            storageProfile:
              imageReference:
                id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set with Host Encryption using encryptionAtHost property.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            Plan = new AzureNative.Compute.Inputs.PlanArgs
            {
                Name = "windows2016",
                Product = "windows-data-science-vm",
                Publisher = "microsoft-ads",
            },
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_DS1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs
                {
                    EncryptionAtHost = true,
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Offer = "windows-data-science-vm",
                        Publisher = "microsoft-ads",
                        Sku = "windows2016",
                        Version = "latest",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadOnly,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    Plan: &compute.PlanArgs{
    Name: pulumi.String("windows2016"),
    Product: pulumi.String("windows-data-science-vm"),
    Publisher: pulumi.String("microsoft-ads"),
    },
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_DS1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    SecurityProfile: &compute.SecurityProfileArgs{
    EncryptionAtHost: pulumi.Bool(true),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Offer: pulumi.String("windows-data-science-vm"),
    Publisher: pulumi.String("microsoft-ads"),
    Sku: pulumi.String("windows2016"),
    Version: pulumi.String("latest"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadOnly,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .plan(Map.ofEntries(
                    Map.entry("name", "windows2016"),
                    Map.entry("product", "windows-data-science-vm"),
                    Map.entry("publisher", "microsoft-ads")
                ))
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_DS1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("securityProfile", Map.of("encryptionAtHost", true)),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.ofEntries(
                            Map.entry("offer", "windows-data-science-vm"),
                            Map.entry("publisher", "microsoft-ads"),
                            Map.entry("sku", "windows2016"),
                            Map.entry("version", "latest")
                        )),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadOnly"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        plan=azure_native.compute.PlanArgs(
            name="windows2016",
            product="windows-data-science-vm",
            publisher="microsoft-ads",
        ),
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_DS1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            security_profile=azure_native.compute.SecurityProfileArgs(
                encryption_at_host=True,
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    offer="windows-data-science-vm",
                    publisher="microsoft-ads",
                    sku="windows2016",
                    version="latest",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_ONLY,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        plan: {
            name: "windows2016",
            product: "windows-data-science-vm",
            publisher: "microsoft-ads",
        },
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_DS1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            securityProfile: {
                encryptionAtHost: true,
            },
            storageProfile: {
                imageReference: {
                    offer: "windows-data-science-vm",
                    publisher: "microsoft-ads",
                    sku: "windows2016",
                    version: "latest",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadOnly,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          plan:
            name: windows2016
            product: windows-data-science-vm
            publisher: microsoft-ads
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_DS1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            securityProfile:
              encryptionAtHost: true
            storageProfile:
              imageReference:
                offer: windows-data-science-vm
                publisher: microsoft-ads
                sku: windows2016
                version: latest
              osDisk:
                caching: ReadOnly
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set with OS image scheduled events enabled.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_D1_v2",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                ScheduledEventsProfile = new AzureNative.Compute.Inputs.ScheduledEventsProfileArgs
                {
                    OsImageNotificationProfile = new AzureNative.Compute.Inputs.OSImageNotificationProfileArgs
                    {
                        Enable = true,
                        NotBeforeTimeout = "PT15M",
                    },
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Offer = "WindowsServer",
                        Publisher = "MicrosoftWindowsServer",
                        Sku = "2016-Datacenter",
                        Version = "latest",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = "Standard_LRS",
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("westus"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_D1_v2"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: &compute.UpgradePolicyArgs{
    Mode: compute.UpgradeModeManual,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    ScheduledEventsProfile: interface{}{
    OsImageNotificationProfile: &compute.OSImageNotificationProfileArgs{
    Enable: pulumi.Bool(true),
    NotBeforeTimeout: pulumi.String("PT15M"),
    },
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Offer: pulumi.String("WindowsServer"),
    Publisher: pulumi.String("MicrosoftWindowsServer"),
    Sku: pulumi.String("2016-Datacenter"),
    Version: pulumi.String("latest"),
    },
    OsDisk: interface{}{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    StorageAccountType: pulumi.String("Standard_LRS"),
    },
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("westus")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_D1_v2"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.of("mode", "Manual"))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("scheduledEventsProfile", Map.of("osImageNotificationProfile", Map.ofEntries(
                        Map.entry("enable", true),
                        Map.entry("notBeforeTimeout", "PT15M")
                    ))),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.ofEntries(
                            Map.entry("offer", "WindowsServer"),
                            Map.entry("publisher", "MicrosoftWindowsServer"),
                            Map.entry("sku", "2016-Datacenter"),
                            Map.entry("version", "latest")
                        )),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("managedDisk", Map.of("storageAccountType", "Standard_LRS"))
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="westus",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_D1_v2",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyArgs(
            mode=azure_native.compute.UpgradeMode.MANUAL,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            scheduled_events_profile={
                "osImageNotificationProfile": azure_native.compute.OSImageNotificationProfileArgs(
                    enable=True,
                    not_before_timeout="PT15M",
                ),
            },
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    offer="WindowsServer",
                    publisher="MicrosoftWindowsServer",
                    sku="2016-Datacenter",
                    version="latest",
                ),
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": "FromImage",
                    "managedDisk": azure_native.compute.VirtualMachineScaleSetManagedDiskParametersArgs(
                        storage_account_type="Standard_LRS",
                    ),
                },
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "westus",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_D1_v2",
            tier: "Standard",
        },
        upgradePolicy: {
            mode: azure_native.compute.UpgradeMode.Manual,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            scheduledEventsProfile: {
                osImageNotificationProfile: {
                    enable: true,
                    notBeforeTimeout: "PT15M",
                },
            },
            storageProfile: {
                imageReference: {
                    offer: "WindowsServer",
                    publisher: "MicrosoftWindowsServer",
                    sku: "2016-Datacenter",
                    version: "latest",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    managedDisk: {
                        storageAccountType: "Standard_LRS",
                    },
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: westus
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_D1_v2
            tier: Standard
          upgradePolicy:
            mode: Manual
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            scheduledEventsProfile:
              osImageNotificationProfile:
                enable: true
                notBeforeTimeout: PT15M
            storageProfile:
              imageReference:
                offer: WindowsServer
                publisher: MicrosoftWindowsServer
                sku: 2016-Datacenter
                version: latest
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                managedDisk:
                  storageAccountType: Standard_LRS
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set with Security Posture Reference

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "eastus2euap",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_A1",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                AutomaticOSUpgradePolicy = new AzureNative.Compute.Inputs.AutomaticOSUpgradePolicyArgs
                {
                    EnableAutomaticOSUpgrade = true,
                },
                Mode = AzureNative.Compute.UpgradeMode.Automatic,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                SecurityPostureReference = new AzureNative.Compute.Inputs.SecurityPostureReferenceArgs
                {
                    Id = "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest",
                },
                StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
                {
                    ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
                    {
                        Offer = "WindowsServer",
                        Publisher = "MicrosoftWindowsServer",
                        Sku = "2022-Datacenter",
                        Version = "latest",
                    },
                    OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
                    {
                        Caching = AzureNative.Compute.CachingTypes.ReadWrite,
                        CreateOption = "FromImage",
                        Name = "osDisk",
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
    Location: pulumi.String("eastus2euap"),
    Overprovision: pulumi.Bool(true),
    ResourceGroupName: pulumi.String("myResourceGroup"),
    Sku: &compute.SkuArgs{
    Capacity: pulumi.Float64(3),
    Name: pulumi.String("Standard_A1"),
    Tier: pulumi.String("Standard"),
    },
    UpgradePolicy: compute.UpgradePolicyResponse{
    AutomaticOSUpgradePolicy: &compute.AutomaticOSUpgradePolicyArgs{
    EnableAutomaticOSUpgrade: pulumi.Bool(true),
    },
    Mode: compute.UpgradeModeAutomatic,
    },
    VirtualMachineProfile: compute.VirtualMachineScaleSetVMProfileResponse{
    NetworkProfile: interface{}{
    NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    interface{}{
    EnableIPForwarding: pulumi.Bool(true),
    IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    interface{}{
    Name: pulumi.String("{vmss-name}"),
    Subnet: &compute.ApiEntityReferenceArgs{
    Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
    },
    },
    },
    Name: pulumi.String("{vmss-name}"),
    Primary: pulumi.Bool(true),
    },
    },
    },
    OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
    AdminPassword: pulumi.String("{your-password}"),
    AdminUsername: pulumi.String("{your-username}"),
    ComputerNamePrefix: pulumi.String("{vmss-name}"),
    },
    SecurityPostureReference: &compute.SecurityPostureReferenceArgs{
    Id: pulumi.String("/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest"),
    },
    StorageProfile: interface{}{
    ImageReference: &compute.ImageReferenceArgs{
    Offer: pulumi.String("WindowsServer"),
    Publisher: pulumi.String("MicrosoftWindowsServer"),
    Sku: pulumi.String("2022-Datacenter"),
    Version: pulumi.String("latest"),
    },
    OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    Caching: compute.CachingTypesReadWrite,
    CreateOption: pulumi.String("FromImage"),
    Name: pulumi.String("osDisk"),
    },
    },
    },
    VmScaleSetName: pulumi.String("{vmss-name}"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
    import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()        
                .location("eastus2euap")
                .overprovision(true)
                .resourceGroupName("myResourceGroup")
                .sku(Map.ofEntries(
                    Map.entry("capacity", 3),
                    Map.entry("name", "Standard_A1"),
                    Map.entry("tier", "Standard")
                ))
                .upgradePolicy(Map.ofEntries(
                    Map.entry("automaticOSUpgradePolicy", Map.of("enableAutomaticOSUpgrade", true)),
                    Map.entry("mode", "Automatic")
                ))
                .virtualMachineProfile(Map.ofEntries(
                    Map.entry("networkProfile", Map.of("networkInterfaceConfigurations", Map.ofEntries(
                        Map.entry("enableIPForwarding", true),
                        Map.entry("ipConfigurations", Map.ofEntries(
                            Map.entry("name", "{vmss-name}"),
                            Map.entry("subnet", Map.of("id", "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"))
                        )),
                        Map.entry("name", "{vmss-name}"),
                        Map.entry("primary", true)
                    ))),
                    Map.entry("osProfile", Map.ofEntries(
                        Map.entry("adminPassword", "{your-password}"),
                        Map.entry("adminUsername", "{your-username}"),
                        Map.entry("computerNamePrefix", "{vmss-name}")
                    )),
                    Map.entry("securityPostureReference", Map.of("id", "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest")),
                    Map.entry("storageProfile", Map.ofEntries(
                        Map.entry("imageReference", Map.ofEntries(
                            Map.entry("offer", "WindowsServer"),
                            Map.entry("publisher", "MicrosoftWindowsServer"),
                            Map.entry("sku", "2022-Datacenter"),
                            Map.entry("version", "latest")
                        )),
                        Map.entry("osDisk", Map.ofEntries(
                            Map.entry("caching", "ReadWrite"),
                            Map.entry("createOption", "FromImage"),
                            Map.entry("name", "osDisk")
                        ))
                    ))
                ))
                .vmScaleSetName("{vmss-name}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
        location="eastus2euap",
        overprovision=True,
        resource_group_name="myResourceGroup",
        sku=azure_native.compute.SkuArgs(
            capacity=3,
            name="Standard_A1",
            tier="Standard",
        ),
        upgrade_policy=azure_native.compute.UpgradePolicyResponseArgs(
            automatic_os_upgrade_policy=azure_native.compute.AutomaticOSUpgradePolicyArgs(
                enable_automatic_os_upgrade=True,
            ),
            mode=azure_native.compute.UpgradeMode.AUTOMATIC,
        ),
        virtual_machine_profile=azure_native.compute.VirtualMachineScaleSetVMProfileResponseArgs(
            network_profile={
                "networkInterfaceConfigurations": [{
                    "enableIPForwarding": True,
                    "ipConfigurations": [{
                        "name": "{vmss-name}",
                        "subnet": azure_native.compute.ApiEntityReferenceArgs(
                            id="/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        ),
                    }],
                    "name": "{vmss-name}",
                    "primary": True,
                }],
            },
            os_profile=azure_native.compute.VirtualMachineScaleSetOSProfileArgs(
                admin_password="{your-password}",
                admin_username="{your-username}",
                computer_name_prefix="{vmss-name}",
            ),
            security_posture_reference=azure_native.compute.SecurityPostureReferenceArgs(
                id="/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest",
            ),
            storage_profile={
                "imageReference": azure_native.compute.ImageReferenceArgs(
                    offer="WindowsServer",
                    publisher="MicrosoftWindowsServer",
                    sku="2022-Datacenter",
                    version="latest",
                ),
                "osDisk": azure_native.compute.VirtualMachineScaleSetOSDiskArgs(
                    caching=azure_native.compute.CachingTypes.READ_WRITE,
                    create_option="FromImage",
                    name="osDisk",
                ),
            },
        ),
        vm_scale_set_name="{vmss-name}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
        location: "eastus2euap",
        overprovision: true,
        resourceGroupName: "myResourceGroup",
        sku: {
            capacity: 3,
            name: "Standard_A1",
            tier: "Standard",
        },
        upgradePolicy: {
            automaticOSUpgradePolicy: {
                enableAutomaticOSUpgrade: true,
            },
            mode: azure_native.compute.UpgradeMode.Automatic,
        },
        virtualMachineProfile: {
            networkProfile: {
                networkInterfaceConfigurations: [{
                    enableIPForwarding: true,
                    ipConfigurations: [{
                        name: "{vmss-name}",
                        subnet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                        },
                    }],
                    name: "{vmss-name}",
                    primary: true,
                }],
            },
            osProfile: {
                adminPassword: "{your-password}",
                adminUsername: "{your-username}",
                computerNamePrefix: "{vmss-name}",
            },
            securityPostureReference: {
                id: "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest",
            },
            storageProfile: {
                imageReference: {
                    offer: "WindowsServer",
                    publisher: "MicrosoftWindowsServer",
                    sku: "2022-Datacenter",
                    version: "latest",
                },
                osDisk: {
                    caching: azure_native.compute.CachingTypes.ReadWrite,
                    createOption: "FromImage",
                    name: "osDisk",
                },
            },
        },
        vmScaleSetName: "{vmss-name}",
    });
    
    resources:
      virtualMachineScaleSet:
        type: azure-native:compute:VirtualMachineScaleSet
        properties:
          location: eastus2euap
          overprovision: true
          resourceGroupName: myResourceGroup
          sku:
            capacity: 3
            name: Standard_A1
            tier: Standard
          upgradePolicy:
            automaticOSUpgradePolicy:
              enableAutomaticOSUpgrade: true
            mode: Automatic
          virtualMachineProfile:
            networkProfile:
              networkInterfaceConfigurations:
                - enableIPForwarding: true
                  ipConfigurations:
                    - name: '{vmss-name}'
                      subnet:
                        id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
                  name: '{vmss-name}'
                  primary: true
            osProfile:
              adminPassword: '{your-password}'
              adminUsername: '{your-username}'
              computerNamePrefix: '{vmss-name}'
            securityPostureReference:
              id: /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest
            storageProfile:
              imageReference:
                offer: WindowsServer
                publisher: MicrosoftWindowsServer
                sku: 2022-Datacenter
                version: latest
              osDisk:
                caching: ReadWrite
                createOption: FromImage
                name: osDisk
          vmScaleSetName: '{vmss-name}'
    

    Create a scale set with SecurityType as ConfidentialVM

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
        {
            Location = "westus",
            Overprovision = true,
            ResourceGroupName = "myResourceGroup",
            Sku = new AzureNative.Compute.Inputs.SkuArgs
            {
                Capacity = 3,
                Name = "Standard_DC2as_v5",
                Tier = "Standard",
            },
            UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
            {
                Mode = AzureNative.Compute.UpgradeMode.Manual,
            },
            VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
            {
                NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
                {
                    NetworkInterfaceConfigurations = new[]
                    {
                        new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
                        {
                            EnableIPForwarding = true,
                            IpConfigurations = new[]
                            {
                                new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
                                {
                                    Name = "{vmss-name}",
                                    Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
                                    {
                                        Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
                                    },
                                },
                            },
                            Name = "{vmss-name}",
                            Primary = true,
                        },
                    },
                },
                OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
                {
                    AdminPassword = "{your-password}",
                    AdminUsername = "{your-username}",
                    ComputerNamePrefix = "{vmss-name}",
                },
                SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs
                {
                    SecurityType = "ConfidentialVM",