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.49.1 published on Tuesday, Jul 9, 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.49.1 published on Tuesday, Jul 9, 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, 2024-03-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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				DiagnosticsProfile: &compute.DiagnosticsProfileArgs{
    					BootDiagnostics: &compute.BootDiagnosticsArgs{
    						Enabled:    pulumi.Bool(true),
    						StorageUri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net"),
    					},
    				},
    				ExtensionProfile: &compute.VirtualMachineScaleSetExtensionProfileArgs{
    					Extensions: compute.VirtualMachineScaleSetExtensionTypeArray{
    						&compute.VirtualMachineScaleSetExtensionTypeArgs{
    							AutoUpgradeMinorVersion: pulumi.Bool(false),
    							Name:                    pulumi.String("{extension-name}"),
    							Publisher:               pulumi.String("{extension-Publisher}"),
    							Settings:                pulumi.Any(nil),
    							SuppressFailures:        pulumi.Bool(true),
    							Type:                    pulumi.String("{extension-Type}"),
    							TypeHandlerVersion:      pulumi.String("{handler-version}"),
    						},
    					},
    				},
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					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(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;
    import com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetExtensionProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .diagnosticsProfile(DiagnosticsProfileArgs.builder()
                        .bootDiagnostics(BootDiagnosticsArgs.builder()
                            .enabled(true)
                            .storageUri("http://{existing-storage-account-name}.blob.core.windows.net")
                            .build())
                        .build())
                    .extensionProfile(VirtualMachineScaleSetExtensionProfileArgs.builder()
                        .extensions(VirtualMachineScaleSetExtensionArgs.builder()
                            .autoUpgradeMinorVersion(false)
                            .name("{extension-name}")
                            .publisher("{extension-Publisher}")
                            .settings()
                            .suppressFailures(true)
                            .type("{extension-Type}")
                            .typeHandlerVersion("{handler-version}")
                            .build())
                        .build())
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .offer("WindowsServer")
                            .publisher("MicrosoftWindowsServer")
                            .sku("2016-Datacenter")
                            .version("latest")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				DiagnosticsProfile: &compute.DiagnosticsProfileArgs{
    					BootDiagnostics: &compute.BootDiagnosticsArgs{
    						Enabled:    pulumi.Bool(true),
    						StorageUri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net"),
    					},
    				},
    				ExtensionProfile: &compute.VirtualMachineScaleSetExtensionProfileArgs{
    					Extensions: compute.VirtualMachineScaleSetExtensionTypeArray{
    						&compute.VirtualMachineScaleSetExtensionTypeArgs{
    							AutoUpgradeMinorVersion: pulumi.Bool(false),
    							Name:                    pulumi.String("{extension-name}"),
    							ProtectedSettingsFromKeyVault: &compute.KeyVaultSecretReferenceArgs{
    								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:           pulumi.Any(nil),
    							Type:               pulumi.String("{extension-Type}"),
    							TypeHandlerVersion: pulumi.String("{handler-version}"),
    						},
    					},
    				},
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					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(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;
    import com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetExtensionProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .diagnosticsProfile(DiagnosticsProfileArgs.builder()
                        .bootDiagnostics(BootDiagnosticsArgs.builder()
                            .enabled(true)
                            .storageUri("http://{existing-storage-account-name}.blob.core.windows.net")
                            .build())
                        .build())
                    .extensionProfile(VirtualMachineScaleSetExtensionProfileArgs.builder()
                        .extensions(VirtualMachineScaleSetExtensionArgs.builder()
                            .autoUpgradeMinorVersion(false)
                            .name("{extension-name}")
                            .protectedSettingsFromKeyVault(KeyVaultSecretReferenceArgs.builder()
                                .secretUrl("https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e")
                                .sourceVault(SubResourceArgs.builder()
                                    .id("/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName")
                                    .build())
                                .build())
                            .publisher("{extension-Publisher}")
                            .settings()
                            .type("{extension-Type}")
                            .typeHandlerVersion("{handler-version}")
                            .build())
                        .build())
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .offer("WindowsServer")
                            .publisher("MicrosoftWindowsServer")
                            .sku("2016-Datacenter")
                            .version("latest")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.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 (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    						Caching:      compute.CachingTypesReadWrite,
    						CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
    						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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualHardDiskArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .image(VirtualHardDiskArgs.builder()
                                .uri("http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd")
                                .build())
                            .name("osDisk")
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "image": {
                        "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: azure_native.compute.DiskCreateOptionTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.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 (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					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(compute.DiskCreateOptionTypesFromImage),
    						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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .offer("WindowsServer")
                            .publisher("MicrosoftWindowsServer")
                            .sku("2016-Datacenter")
                            .version("latest")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .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")
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "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",
                    ],
                },
            },
        },
        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: azure_native.compute.DiskCreateOptionTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					ImageReference: &compute.ImageReferenceArgs{
    						Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
    					},
    					OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    						Caching:      compute.CachingTypesReadWrite,
    						CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					ImageReference: &compute.ImageReferenceArgs{
    						Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"),
    					},
    					OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    						Caching:      compute.CachingTypesReadWrite,
    						CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					ImageReference: &compute.ImageReferenceArgs{
    						Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"),
    					},
    					OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    						Caching:      compute.CachingTypesReadWrite,
    						CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.IPVersion.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							DisableTcpStateTracking:     pulumi.Bool(true),
    							EnableAcceleratedNetworking: pulumi.Bool(true),
    							EnableIPForwarding:          pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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),
    						},
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							DisableTcpStateTracking:     pulumi.Bool(false),
    							EnableAcceleratedNetworking: pulumi.Bool(false),
    							EnableIPForwarding:          pulumi.Bool(false),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									Name:                    pulumi.String("{nicConfig2-name}"),
    									Primary:                 pulumi.Bool(true),
    									PrivateIPAddressVersion: pulumi.String(compute.IPVersionIPv4),
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					ImageReference: &compute.ImageReferenceArgs{
    						Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
    					},
    					OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    						Caching:      compute.CachingTypesReadWrite,
    						CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(                    
                            VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                                .disableTcpStateTracking(true)
                                .enableAcceleratedNetworking(true)
                                .enableIPForwarding(true)
                                .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                    .name("{vmss-name}")
                                    .subnet(ApiEntityReferenceArgs.builder()
                                        .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                        .build())
                                    .build())
                                .name("{nicConfig1-name}")
                                .primary(true)
                                .build(),
                            VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                                .disableTcpStateTracking(false)
                                .enableAcceleratedNetworking(false)
                                .enableIPForwarding(false)
                                .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                    .name("{nicConfig2-name}")
                                    .primary(true)
                                    .privateIPAddressVersion("IPv4")
                                    .subnet(ApiEntityReferenceArgs.builder()
                                        .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}")
                                        .build())
                                    .build())
                                .name("{nicConfig2-name}")
                                .primary(false)
                                .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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": azure_native.compute.IPVersion.I_PV4,
                            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.IPVersion.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				ApplicationProfile: &compute.ApplicationProfileArgs{
    					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: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					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(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ApplicationProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .applicationProfile(ApplicationProfileArgs.builder()
                        .galleryApplications(                    
                            VMGalleryApplicationArgs.builder()
                                .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)
                                .build(),
                            VMGalleryApplicationArgs.builder()
                                .packageReferenceId("/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1")
                                .build())
                        .build())
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .offer("WindowsServer")
                            .publisher("MicrosoftWindowsServer")
                            .sku("2016-Datacenter")
                            .version("latest")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.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 = AzureNative.Compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.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 = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					DataDisks: compute.VirtualMachineScaleSetDataDiskArray{
    						&compute.VirtualMachineScaleSetDataDiskArgs{
    							Caching:      compute.CachingTypesReadWrite,
    							CreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),
    							DiskSizeGB:   pulumi.Int(1023),
    							Lun:          pulumi.Int(0),
    							ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    								DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
    									Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
    								},
    								StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
    							},
    						},
    					},
    					ImageReference: &compute.ImageReferenceArgs{
    						Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
    					},
    					OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    						Caching:      compute.CachingTypesReadWrite,
    						CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
    								Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
    							},
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    import com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_DS1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .dataDisks(VirtualMachineScaleSetDataDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("Empty")
                            .diskSizeGB(1023)
                            .lun(0)
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}")
                                    .build())
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .imageReference(ImageReferenceArgs.builder()
                            .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}")
                                    .build())
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_DS1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.EMPTY,
                    "diskSizeGB": 1023,
                    "lun": 0,
                    "managedDisk": {
                        "diskEncryptionSet": {
                            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                        },
                        "storageAccountType": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
                    },
                }],
                "imageReference": {
                    "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
                },
                "osDisk": {
                    "caching": azure_native.compute.CachingTypes.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "diskEncryptionSet": {
                            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                        },
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.Empty,
                    diskSizeGB: 1023,
                    lun: 0,
                    managedDisk: {
                        diskEncryptionSet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                        },
                        storageAccountType: azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        diskEncryptionSet: {
                            id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
                        },
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.IPVersion.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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),
    						},
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableAcceleratedNetworking: pulumi.Bool(false),
    							EnableFpga:                  pulumi.Bool(true),
    							EnableIPForwarding:          pulumi.Bool(false),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									Name:                    pulumi.String("{fpgaNic-Name}"),
    									Primary:                 pulumi.Bool(true),
    									PrivateIPAddressVersion: pulumi.String(compute.IPVersionIPv4),
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					ImageReference: &compute.ImageReferenceArgs{
    						Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
    					},
    					OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    						Caching:      compute.CachingTypesReadWrite,
    						CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(                    
                            VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                                .enableIPForwarding(true)
                                .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                    .name("{vmss-name}")
                                    .subnet(ApiEntityReferenceArgs.builder()
                                        .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                        .build())
                                    .build())
                                .name("{vmss-name}")
                                .primary(true)
                                .build(),
                            VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                                .enableAcceleratedNetworking(false)
                                .enableFpga(true)
                                .enableIPForwarding(false)
                                .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                    .name("{fpgaNic-Name}")
                                    .primary(true)
                                    .privateIPAddressVersion("IPv4")
                                    .subnet(ApiEntityReferenceArgs.builder()
                                        .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}")
                                        .build())
                                    .build())
                                .name("{fpgaNic-Name}")
                                .primary(false)
                                .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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": azure_native.compute.IPVersion.I_PV4,
                            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.IPVersion.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					ImageReference: &compute.ImageReferenceArgs{
    						Offer:     pulumi.String("windows-data-science-vm"),
    						Publisher: pulumi.String("microsoft-ads"),
    						Sku:       pulumi.String("windows2016"),
    						Version:   pulumi.String("latest"),
    					},
    					OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
    						Caching:      compute.CachingTypesReadOnly,
    						CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.PlanArgs;
    import com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(PlanArgs.builder()
                    .name("windows2016")
                    .product("windows-data-science-vm")
                    .publisher("microsoft-ads")
                    .build())
                .resourceGroupName("myResourceGroup")
                .sku(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_DS1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .securityProfile(SecurityProfileArgs.builder()
                        .encryptionAtHost(true)
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .offer("windows-data-science-vm")
                            .publisher("microsoft-ads")
                            .sku("windows2016")
                            .version("latest")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadOnly")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "name": "windows2016",
            "product": "windows-data-science-vm",
            "publisher": "microsoft-ads",
        },
        resource_group_name="myResourceGroup",
        sku={
            "capacity": 3,
            "name": "Standard_DS1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_ONLY,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
                        {
                            StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
                        },
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.ScheduledEventsProfileArgs{
    					OsImageNotificationProfile: &compute.OSImageNotificationProfileArgs{
    						Enable:           pulumi.Bool(true),
    						NotBeforeTimeout: pulumi.String("PT15M"),
    					},
    				},
    				StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					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(compute.DiskCreateOptionTypesFromImage),
    						ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
    							StorageAccountType: pulumi.String(compute.StorageAccountTypes_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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ScheduledEventsProfileArgs;
    import com.pulumi.azurenative.compute.inputs.OSImageNotificationProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_D1_v2")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .mode("Manual")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .scheduledEventsProfile(ScheduledEventsProfileArgs.builder()
                        .osImageNotificationProfile(OSImageNotificationProfileArgs.builder()
                            .enable(true)
                            .notBeforeTimeout("PT15M")
                            .build())
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
                        .imageReference(ImageReferenceArgs.builder()
                            .offer("WindowsServer")
                            .publisher("MicrosoftWindowsServer")
                            .sku("2016-Datacenter")
                            .version("latest")
                            .build())
                        .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
                            .caching("ReadWrite")
                            .createOption("FromImage")
                            .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
                                .storageAccountType("Standard_LRS")
                                .build())
                            .build())
                        .build())
                    .build())
                .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={
            "capacity": 3,
            "name": "Standard_D1_v2",
            "tier": "Standard",
        },
        upgrade_policy={
            "mode": azure_native.compute.UpgradeMode.MANUAL,
        },
        virtual_machine_profile={
            "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.READ_WRITE,
                    "createOption": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
                    "managedDisk": {
                        "storageAccountType": azure_native.compute.StorageAccountTypes.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: azure_native.compute.DiskCreateOptionTypes.FromImage,
                    managedDisk: {
                        storageAccountType: azure_native.compute.StorageAccountTypes.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 = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
                        Name = "osDisk",
                    },
                },
            },
            VmScaleSetName = "{vmss-name}",
        });
    
    });
    
    package main
    
    import (
    	compute "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.UpgradePolicyArgs{
    				AutomaticOSUpgradePolicy: &compute.AutomaticOSUpgradePolicyArgs{
    					EnableAutomaticOSUpgrade: pulumi.Bool(true),
    				},
    				Mode: compute.UpgradeModeAutomatic,
    			},
    			VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
    				NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
    					NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
    						&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
    							EnableIPForwarding: pulumi.Bool(true),
    							IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
    								&compute.VirtualMachineScaleSetIPConfigurationArgs{
    									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: &compute.VirtualMachineScaleSetStorageProfileArgs{
    					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(compute.DiskCreateOptionTypesFromImage),
    						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 com.pulumi.azurenative.compute.inputs.SkuArgs;
    import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.AutomaticOSUpgradePolicyArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
    import com.pulumi.azurenative.compute.inputs.SecurityPostureReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
    import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
    import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
    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(SkuArgs.builder()
                    .capacity(3)
                    .name("Standard_A1")
                    .tier("Standard")
                    .build())
                .upgradePolicy(UpgradePolicyArgs.builder()
                    .automaticOSUpgradePolicy(AutomaticOSUpgradePolicyArgs.builder()
                        .enableAutomaticOSUpgrade(true)
                        .build())
                    .mode("Automatic")
                    .build())
                .virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
                    .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
                        .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
                            .enableIPForwarding(true)
                            .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
                                .name("{vmss-name}")
                                .subnet(ApiEntityReferenceArgs.builder()
                                    .id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
                                    .build())
                                .build())
                            .name("{vmss-name}")
                            .primary(true)
                            .build())
                        .build())
                    .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
                        .adminPassword("{your-password}")
                        .adminUsername("{your-username}")
                        .computerNamePrefix("{vmss-name}")
                        .build())
                    .securityPostureReference(SecurityPostureReferenceArgs.builder()
                        .id("/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest")
                        .build())
                    .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()