1. Packages
  2. Azure Classic
  3. API Docs
  4. compute
  5. ScaleSet

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

azure.compute.ScaleSet

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

    Manages a virtual machine scale set.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as std from "@pulumi/std";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "acctvn",
        addressSpaces: ["10.0.0.0/16"],
        location: example.location,
        resourceGroupName: example.name,
    });
    const exampleSubnet = new azure.network.Subnet("example", {
        name: "acctsub",
        resourceGroupName: example.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.2.0/24"],
    });
    const examplePublicIp = new azure.network.PublicIp("example", {
        name: "test",
        location: example.location,
        resourceGroupName: example.name,
        allocationMethod: "Static",
        domainNameLabel: example.name,
        tags: {
            environment: "staging",
        },
    });
    const exampleLoadBalancer = new azure.lb.LoadBalancer("example", {
        name: "test",
        location: example.location,
        resourceGroupName: example.name,
        frontendIpConfigurations: [{
            name: "PublicIPAddress",
            publicIpAddressId: examplePublicIp.id,
        }],
    });
    const bpepool = new azure.lb.BackendAddressPool("bpepool", {
        loadbalancerId: exampleLoadBalancer.id,
        name: "BackEndAddressPool",
    });
    const lbnatpool = new azure.lb.NatPool("lbnatpool", {
        resourceGroupName: example.name,
        name: "ssh",
        loadbalancerId: exampleLoadBalancer.id,
        protocol: "Tcp",
        frontendPortStart: 50000,
        frontendPortEnd: 50119,
        backendPort: 22,
        frontendIpConfigurationName: "PublicIPAddress",
    });
    const exampleProbe = new azure.lb.Probe("example", {
        loadbalancerId: exampleLoadBalancer.id,
        name: "http-probe",
        protocol: "Http",
        requestPath: "/health",
        port: 8080,
    });
    const exampleScaleSet = new azure.compute.ScaleSet("example", {
        name: "mytestscaleset-1",
        location: example.location,
        resourceGroupName: example.name,
        automaticOsUpgrade: true,
        upgradePolicyMode: "Rolling",
        rollingUpgradePolicy: {
            maxBatchInstancePercent: 20,
            maxUnhealthyInstancePercent: 20,
            maxUnhealthyUpgradedInstancePercent: 5,
            pauseTimeBetweenBatches: "PT0S",
        },
        healthProbeId: exampleProbe.id,
        sku: {
            name: "Standard_F2",
            tier: "Standard",
            capacity: 2,
        },
        storageProfileImageReference: {
            publisher: "Canonical",
            offer: "0001-com-ubuntu-server-jammy",
            sku: "22_04-lts",
            version: "latest",
        },
        storageProfileOsDisk: {
            name: "",
            caching: "ReadWrite",
            createOption: "FromImage",
            managedDiskType: "Standard_LRS",
        },
        storageProfileDataDisks: [{
            lun: 0,
            caching: "ReadWrite",
            createOption: "Empty",
            diskSizeGb: 10,
        }],
        osProfile: {
            computerNamePrefix: "testvm",
            adminUsername: "myadmin",
        },
        osProfileLinuxConfig: {
            disablePasswordAuthentication: true,
            sshKeys: [{
                path: "/home/myadmin/.ssh/authorized_keys",
                keyData: std.file({
                    input: "~/.ssh/demo_key.pub",
                }).then(invoke => invoke.result),
            }],
        },
        networkProfiles: [{
            name: "mynetworkprofile",
            primary: true,
            ipConfigurations: [{
                name: "TestIPConfiguration",
                primary: true,
                subnetId: exampleSubnet.id,
                loadBalancerBackendAddressPoolIds: [bpepool.id],
                loadBalancerInboundNatRulesIds: [lbnatpool.id],
            }],
        }],
        tags: {
            environment: "staging",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    import pulumi_std as std
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="acctvn",
        address_spaces=["10.0.0.0/16"],
        location=example.location,
        resource_group_name=example.name)
    example_subnet = azure.network.Subnet("example",
        name="acctsub",
        resource_group_name=example.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.2.0/24"])
    example_public_ip = azure.network.PublicIp("example",
        name="test",
        location=example.location,
        resource_group_name=example.name,
        allocation_method="Static",
        domain_name_label=example.name,
        tags={
            "environment": "staging",
        })
    example_load_balancer = azure.lb.LoadBalancer("example",
        name="test",
        location=example.location,
        resource_group_name=example.name,
        frontend_ip_configurations=[azure.lb.LoadBalancerFrontendIpConfigurationArgs(
            name="PublicIPAddress",
            public_ip_address_id=example_public_ip.id,
        )])
    bpepool = azure.lb.BackendAddressPool("bpepool",
        loadbalancer_id=example_load_balancer.id,
        name="BackEndAddressPool")
    lbnatpool = azure.lb.NatPool("lbnatpool",
        resource_group_name=example.name,
        name="ssh",
        loadbalancer_id=example_load_balancer.id,
        protocol="Tcp",
        frontend_port_start=50000,
        frontend_port_end=50119,
        backend_port=22,
        frontend_ip_configuration_name="PublicIPAddress")
    example_probe = azure.lb.Probe("example",
        loadbalancer_id=example_load_balancer.id,
        name="http-probe",
        protocol="Http",
        request_path="/health",
        port=8080)
    example_scale_set = azure.compute.ScaleSet("example",
        name="mytestscaleset-1",
        location=example.location,
        resource_group_name=example.name,
        automatic_os_upgrade=True,
        upgrade_policy_mode="Rolling",
        rolling_upgrade_policy=azure.compute.ScaleSetRollingUpgradePolicyArgs(
            max_batch_instance_percent=20,
            max_unhealthy_instance_percent=20,
            max_unhealthy_upgraded_instance_percent=5,
            pause_time_between_batches="PT0S",
        ),
        health_probe_id=example_probe.id,
        sku=azure.compute.ScaleSetSkuArgs(
            name="Standard_F2",
            tier="Standard",
            capacity=2,
        ),
        storage_profile_image_reference=azure.compute.ScaleSetStorageProfileImageReferenceArgs(
            publisher="Canonical",
            offer="0001-com-ubuntu-server-jammy",
            sku="22_04-lts",
            version="latest",
        ),
        storage_profile_os_disk=azure.compute.ScaleSetStorageProfileOsDiskArgs(
            name="",
            caching="ReadWrite",
            create_option="FromImage",
            managed_disk_type="Standard_LRS",
        ),
        storage_profile_data_disks=[azure.compute.ScaleSetStorageProfileDataDiskArgs(
            lun=0,
            caching="ReadWrite",
            create_option="Empty",
            disk_size_gb=10,
        )],
        os_profile=azure.compute.ScaleSetOsProfileArgs(
            computer_name_prefix="testvm",
            admin_username="myadmin",
        ),
        os_profile_linux_config=azure.compute.ScaleSetOsProfileLinuxConfigArgs(
            disable_password_authentication=True,
            ssh_keys=[azure.compute.ScaleSetOsProfileLinuxConfigSshKeyArgs(
                path="/home/myadmin/.ssh/authorized_keys",
                key_data=std.file(input="~/.ssh/demo_key.pub").result,
            )],
        ),
        network_profiles=[azure.compute.ScaleSetNetworkProfileArgs(
            name="mynetworkprofile",
            primary=True,
            ip_configurations=[azure.compute.ScaleSetNetworkProfileIpConfigurationArgs(
                name="TestIPConfiguration",
                primary=True,
                subnet_id=example_subnet.id,
                load_balancer_backend_address_pool_ids=[bpepool.id],
                load_balancer_inbound_nat_rules_ids=[lbnatpool.id],
            )],
        )],
        tags={
            "environment": "staging",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/lb"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
    			Name: pulumi.String("acctvn"),
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
    			Name:               pulumi.String("acctsub"),
    			ResourceGroupName:  example.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.2.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
    			Name:              pulumi.String("test"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			AllocationMethod:  pulumi.String("Static"),
    			DomainNameLabel:   example.Name,
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("staging"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{
    			Name:              pulumi.String("test"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
    				&lb.LoadBalancerFrontendIpConfigurationArgs{
    					Name:              pulumi.String("PublicIPAddress"),
    					PublicIpAddressId: examplePublicIp.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		bpepool, err := lb.NewBackendAddressPool(ctx, "bpepool", &lb.BackendAddressPoolArgs{
    			LoadbalancerId: exampleLoadBalancer.ID(),
    			Name:           pulumi.String("BackEndAddressPool"),
    		})
    		if err != nil {
    			return err
    		}
    		lbnatpool, err := lb.NewNatPool(ctx, "lbnatpool", &lb.NatPoolArgs{
    			ResourceGroupName:           example.Name,
    			Name:                        pulumi.String("ssh"),
    			LoadbalancerId:              exampleLoadBalancer.ID(),
    			Protocol:                    pulumi.String("Tcp"),
    			FrontendPortStart:           pulumi.Int(50000),
    			FrontendPortEnd:             pulumi.Int(50119),
    			BackendPort:                 pulumi.Int(22),
    			FrontendIpConfigurationName: pulumi.String("PublicIPAddress"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleProbe, err := lb.NewProbe(ctx, "example", &lb.ProbeArgs{
    			LoadbalancerId: exampleLoadBalancer.ID(),
    			Name:           pulumi.String("http-probe"),
    			Protocol:       pulumi.String("Http"),
    			RequestPath:    pulumi.String("/health"),
    			Port:           pulumi.Int(8080),
    		})
    		if err != nil {
    			return err
    		}
    		invokeFile, err := std.File(ctx, &std.FileArgs{
    			Input: "~/.ssh/demo_key.pub",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{
    			Name:               pulumi.String("mytestscaleset-1"),
    			Location:           example.Location,
    			ResourceGroupName:  example.Name,
    			AutomaticOsUpgrade: pulumi.Bool(true),
    			UpgradePolicyMode:  pulumi.String("Rolling"),
    			RollingUpgradePolicy: &compute.ScaleSetRollingUpgradePolicyArgs{
    				MaxBatchInstancePercent:             pulumi.Int(20),
    				MaxUnhealthyInstancePercent:         pulumi.Int(20),
    				MaxUnhealthyUpgradedInstancePercent: pulumi.Int(5),
    				PauseTimeBetweenBatches:             pulumi.String("PT0S"),
    			},
    			HealthProbeId: exampleProbe.ID(),
    			Sku: &compute.ScaleSetSkuArgs{
    				Name:     pulumi.String("Standard_F2"),
    				Tier:     pulumi.String("Standard"),
    				Capacity: pulumi.Int(2),
    			},
    			StorageProfileImageReference: &compute.ScaleSetStorageProfileImageReferenceArgs{
    				Publisher: pulumi.String("Canonical"),
    				Offer:     pulumi.String("0001-com-ubuntu-server-jammy"),
    				Sku:       pulumi.String("22_04-lts"),
    				Version:   pulumi.String("latest"),
    			},
    			StorageProfileOsDisk: &compute.ScaleSetStorageProfileOsDiskArgs{
    				Name:            pulumi.String(""),
    				Caching:         pulumi.String("ReadWrite"),
    				CreateOption:    pulumi.String("FromImage"),
    				ManagedDiskType: pulumi.String("Standard_LRS"),
    			},
    			StorageProfileDataDisks: compute.ScaleSetStorageProfileDataDiskArray{
    				&compute.ScaleSetStorageProfileDataDiskArgs{
    					Lun:          pulumi.Int(0),
    					Caching:      pulumi.String("ReadWrite"),
    					CreateOption: pulumi.String("Empty"),
    					DiskSizeGb:   pulumi.Int(10),
    				},
    			},
    			OsProfile: &compute.ScaleSetOsProfileArgs{
    				ComputerNamePrefix: pulumi.String("testvm"),
    				AdminUsername:      pulumi.String("myadmin"),
    			},
    			OsProfileLinuxConfig: &compute.ScaleSetOsProfileLinuxConfigArgs{
    				DisablePasswordAuthentication: pulumi.Bool(true),
    				SshKeys: compute.ScaleSetOsProfileLinuxConfigSshKeyArray{
    					&compute.ScaleSetOsProfileLinuxConfigSshKeyArgs{
    						Path:    pulumi.String("/home/myadmin/.ssh/authorized_keys"),
    						KeyData: invokeFile.Result,
    					},
    				},
    			},
    			NetworkProfiles: compute.ScaleSetNetworkProfileArray{
    				&compute.ScaleSetNetworkProfileArgs{
    					Name:    pulumi.String("mynetworkprofile"),
    					Primary: pulumi.Bool(true),
    					IpConfigurations: compute.ScaleSetNetworkProfileIpConfigurationArray{
    						&compute.ScaleSetNetworkProfileIpConfigurationArgs{
    							Name:     pulumi.String("TestIPConfiguration"),
    							Primary:  pulumi.Bool(true),
    							SubnetId: exampleSubnet.ID(),
    							LoadBalancerBackendAddressPoolIds: pulumi.StringArray{
    								bpepool.ID(),
    							},
    							LoadBalancerInboundNatRulesIds: pulumi.StringArray{
    								lbnatpool.ID(),
    							},
    						},
    					},
    				},
    			},
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("staging"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "acctvn",
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var exampleSubnet = new Azure.Network.Subnet("example", new()
        {
            Name = "acctsub",
            ResourceGroupName = example.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.2.0/24",
            },
        });
    
        var examplePublicIp = new Azure.Network.PublicIp("example", new()
        {
            Name = "test",
            Location = example.Location,
            ResourceGroupName = example.Name,
            AllocationMethod = "Static",
            DomainNameLabel = example.Name,
            Tags = 
            {
                { "environment", "staging" },
            },
        });
    
        var exampleLoadBalancer = new Azure.Lb.LoadBalancer("example", new()
        {
            Name = "test",
            Location = example.Location,
            ResourceGroupName = example.Name,
            FrontendIpConfigurations = new[]
            {
                new Azure.Lb.Inputs.LoadBalancerFrontendIpConfigurationArgs
                {
                    Name = "PublicIPAddress",
                    PublicIpAddressId = examplePublicIp.Id,
                },
            },
        });
    
        var bpepool = new Azure.Lb.BackendAddressPool("bpepool", new()
        {
            LoadbalancerId = exampleLoadBalancer.Id,
            Name = "BackEndAddressPool",
        });
    
        var lbnatpool = new Azure.Lb.NatPool("lbnatpool", new()
        {
            ResourceGroupName = example.Name,
            Name = "ssh",
            LoadbalancerId = exampleLoadBalancer.Id,
            Protocol = "Tcp",
            FrontendPortStart = 50000,
            FrontendPortEnd = 50119,
            BackendPort = 22,
            FrontendIpConfigurationName = "PublicIPAddress",
        });
    
        var exampleProbe = new Azure.Lb.Probe("example", new()
        {
            LoadbalancerId = exampleLoadBalancer.Id,
            Name = "http-probe",
            Protocol = "Http",
            RequestPath = "/health",
            Port = 8080,
        });
    
        var exampleScaleSet = new Azure.Compute.ScaleSet("example", new()
        {
            Name = "mytestscaleset-1",
            Location = example.Location,
            ResourceGroupName = example.Name,
            AutomaticOsUpgrade = true,
            UpgradePolicyMode = "Rolling",
            RollingUpgradePolicy = new Azure.Compute.Inputs.ScaleSetRollingUpgradePolicyArgs
            {
                MaxBatchInstancePercent = 20,
                MaxUnhealthyInstancePercent = 20,
                MaxUnhealthyUpgradedInstancePercent = 5,
                PauseTimeBetweenBatches = "PT0S",
            },
            HealthProbeId = exampleProbe.Id,
            Sku = new Azure.Compute.Inputs.ScaleSetSkuArgs
            {
                Name = "Standard_F2",
                Tier = "Standard",
                Capacity = 2,
            },
            StorageProfileImageReference = new Azure.Compute.Inputs.ScaleSetStorageProfileImageReferenceArgs
            {
                Publisher = "Canonical",
                Offer = "0001-com-ubuntu-server-jammy",
                Sku = "22_04-lts",
                Version = "latest",
            },
            StorageProfileOsDisk = new Azure.Compute.Inputs.ScaleSetStorageProfileOsDiskArgs
            {
                Name = "",
                Caching = "ReadWrite",
                CreateOption = "FromImage",
                ManagedDiskType = "Standard_LRS",
            },
            StorageProfileDataDisks = new[]
            {
                new Azure.Compute.Inputs.ScaleSetStorageProfileDataDiskArgs
                {
                    Lun = 0,
                    Caching = "ReadWrite",
                    CreateOption = "Empty",
                    DiskSizeGb = 10,
                },
            },
            OsProfile = new Azure.Compute.Inputs.ScaleSetOsProfileArgs
            {
                ComputerNamePrefix = "testvm",
                AdminUsername = "myadmin",
            },
            OsProfileLinuxConfig = new Azure.Compute.Inputs.ScaleSetOsProfileLinuxConfigArgs
            {
                DisablePasswordAuthentication = true,
                SshKeys = new[]
                {
                    new Azure.Compute.Inputs.ScaleSetOsProfileLinuxConfigSshKeyArgs
                    {
                        Path = "/home/myadmin/.ssh/authorized_keys",
                        KeyData = Std.File.Invoke(new()
                        {
                            Input = "~/.ssh/demo_key.pub",
                        }).Apply(invoke => invoke.Result),
                    },
                },
            },
            NetworkProfiles = new[]
            {
                new Azure.Compute.Inputs.ScaleSetNetworkProfileArgs
                {
                    Name = "mynetworkprofile",
                    Primary = true,
                    IpConfigurations = new[]
                    {
                        new Azure.Compute.Inputs.ScaleSetNetworkProfileIpConfigurationArgs
                        {
                            Name = "TestIPConfiguration",
                            Primary = true,
                            SubnetId = exampleSubnet.Id,
                            LoadBalancerBackendAddressPoolIds = new[]
                            {
                                bpepool.Id,
                            },
                            LoadBalancerInboundNatRulesIds = new[]
                            {
                                lbnatpool.Id,
                            },
                        },
                    },
                },
            },
            Tags = 
            {
                { "environment", "staging" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.network.PublicIp;
    import com.pulumi.azure.network.PublicIpArgs;
    import com.pulumi.azure.lb.LoadBalancer;
    import com.pulumi.azure.lb.LoadBalancerArgs;
    import com.pulumi.azure.lb.inputs.LoadBalancerFrontendIpConfigurationArgs;
    import com.pulumi.azure.lb.BackendAddressPool;
    import com.pulumi.azure.lb.BackendAddressPoolArgs;
    import com.pulumi.azure.lb.NatPool;
    import com.pulumi.azure.lb.NatPoolArgs;
    import com.pulumi.azure.lb.Probe;
    import com.pulumi.azure.lb.ProbeArgs;
    import com.pulumi.azure.compute.ScaleSet;
    import com.pulumi.azure.compute.ScaleSetArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetRollingUpgradePolicyArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetStorageProfileImageReferenceArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetStorageProfileOsDiskArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetStorageProfileDataDiskArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetOsProfileArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetOsProfileLinuxConfigArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetNetworkProfileArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
                .name("acctvn")
                .addressSpaces("10.0.0.0/16")
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
                .name("acctsub")
                .resourceGroupName(example.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.2.0/24")
                .build());
    
            var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()        
                .name("test")
                .location(example.location())
                .resourceGroupName(example.name())
                .allocationMethod("Static")
                .domainNameLabel(example.name())
                .tags(Map.of("environment", "staging"))
                .build());
    
            var exampleLoadBalancer = new LoadBalancer("exampleLoadBalancer", LoadBalancerArgs.builder()        
                .name("test")
                .location(example.location())
                .resourceGroupName(example.name())
                .frontendIpConfigurations(LoadBalancerFrontendIpConfigurationArgs.builder()
                    .name("PublicIPAddress")
                    .publicIpAddressId(examplePublicIp.id())
                    .build())
                .build());
    
            var bpepool = new BackendAddressPool("bpepool", BackendAddressPoolArgs.builder()        
                .loadbalancerId(exampleLoadBalancer.id())
                .name("BackEndAddressPool")
                .build());
    
            var lbnatpool = new NatPool("lbnatpool", NatPoolArgs.builder()        
                .resourceGroupName(example.name())
                .name("ssh")
                .loadbalancerId(exampleLoadBalancer.id())
                .protocol("Tcp")
                .frontendPortStart(50000)
                .frontendPortEnd(50119)
                .backendPort(22)
                .frontendIpConfigurationName("PublicIPAddress")
                .build());
    
            var exampleProbe = new Probe("exampleProbe", ProbeArgs.builder()        
                .loadbalancerId(exampleLoadBalancer.id())
                .name("http-probe")
                .protocol("Http")
                .requestPath("/health")
                .port(8080)
                .build());
    
            var exampleScaleSet = new ScaleSet("exampleScaleSet", ScaleSetArgs.builder()        
                .name("mytestscaleset-1")
                .location(example.location())
                .resourceGroupName(example.name())
                .automaticOsUpgrade(true)
                .upgradePolicyMode("Rolling")
                .rollingUpgradePolicy(ScaleSetRollingUpgradePolicyArgs.builder()
                    .maxBatchInstancePercent(20)
                    .maxUnhealthyInstancePercent(20)
                    .maxUnhealthyUpgradedInstancePercent(5)
                    .pauseTimeBetweenBatches("PT0S")
                    .build())
                .healthProbeId(exampleProbe.id())
                .sku(ScaleSetSkuArgs.builder()
                    .name("Standard_F2")
                    .tier("Standard")
                    .capacity(2)
                    .build())
                .storageProfileImageReference(ScaleSetStorageProfileImageReferenceArgs.builder()
                    .publisher("Canonical")
                    .offer("0001-com-ubuntu-server-jammy")
                    .sku("22_04-lts")
                    .version("latest")
                    .build())
                .storageProfileOsDisk(ScaleSetStorageProfileOsDiskArgs.builder()
                    .name("")
                    .caching("ReadWrite")
                    .createOption("FromImage")
                    .managedDiskType("Standard_LRS")
                    .build())
                .storageProfileDataDisks(ScaleSetStorageProfileDataDiskArgs.builder()
                    .lun(0)
                    .caching("ReadWrite")
                    .createOption("Empty")
                    .diskSizeGb(10)
                    .build())
                .osProfile(ScaleSetOsProfileArgs.builder()
                    .computerNamePrefix("testvm")
                    .adminUsername("myadmin")
                    .build())
                .osProfileLinuxConfig(ScaleSetOsProfileLinuxConfigArgs.builder()
                    .disablePasswordAuthentication(true)
                    .sshKeys(ScaleSetOsProfileLinuxConfigSshKeyArgs.builder()
                        .path("/home/myadmin/.ssh/authorized_keys")
                        .keyData(StdFunctions.file(FileArgs.builder()
                            .input("~/.ssh/demo_key.pub")
                            .build()).result())
                        .build())
                    .build())
                .networkProfiles(ScaleSetNetworkProfileArgs.builder()
                    .name("mynetworkprofile")
                    .primary(true)
                    .ipConfigurations(ScaleSetNetworkProfileIpConfigurationArgs.builder()
                        .name("TestIPConfiguration")
                        .primary(true)
                        .subnetId(exampleSubnet.id())
                        .loadBalancerBackendAddressPoolIds(bpepool.id())
                        .loadBalancerInboundNatRulesIds(lbnatpool.id())
                        .build())
                    .build())
                .tags(Map.of("environment", "staging"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: acctvn
          addressSpaces:
            - 10.0.0.0/16
          location: ${example.location}
          resourceGroupName: ${example.name}
      exampleSubnet:
        type: azure:network:Subnet
        name: example
        properties:
          name: acctsub
          resourceGroupName: ${example.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.2.0/24
      examplePublicIp:
        type: azure:network:PublicIp
        name: example
        properties:
          name: test
          location: ${example.location}
          resourceGroupName: ${example.name}
          allocationMethod: Static
          domainNameLabel: ${example.name}
          tags:
            environment: staging
      exampleLoadBalancer:
        type: azure:lb:LoadBalancer
        name: example
        properties:
          name: test
          location: ${example.location}
          resourceGroupName: ${example.name}
          frontendIpConfigurations:
            - name: PublicIPAddress
              publicIpAddressId: ${examplePublicIp.id}
      bpepool:
        type: azure:lb:BackendAddressPool
        properties:
          loadbalancerId: ${exampleLoadBalancer.id}
          name: BackEndAddressPool
      lbnatpool:
        type: azure:lb:NatPool
        properties:
          resourceGroupName: ${example.name}
          name: ssh
          loadbalancerId: ${exampleLoadBalancer.id}
          protocol: Tcp
          frontendPortStart: 50000
          frontendPortEnd: 50119
          backendPort: 22
          frontendIpConfigurationName: PublicIPAddress
      exampleProbe:
        type: azure:lb:Probe
        name: example
        properties:
          loadbalancerId: ${exampleLoadBalancer.id}
          name: http-probe
          protocol: Http
          requestPath: /health
          port: 8080
      exampleScaleSet:
        type: azure:compute:ScaleSet
        name: example
        properties:
          name: mytestscaleset-1
          location: ${example.location}
          resourceGroupName: ${example.name}
          automaticOsUpgrade: true
          upgradePolicyMode: Rolling
          rollingUpgradePolicy:
            maxBatchInstancePercent: 20
            maxUnhealthyInstancePercent: 20
            maxUnhealthyUpgradedInstancePercent: 5
            pauseTimeBetweenBatches: PT0S
          healthProbeId: ${exampleProbe.id}
          sku:
            name: Standard_F2
            tier: Standard
            capacity: 2
          storageProfileImageReference:
            publisher: Canonical
            offer: 0001-com-ubuntu-server-jammy
            sku: 22_04-lts
            version: latest
          storageProfileOsDisk:
            name:
            caching: ReadWrite
            createOption: FromImage
            managedDiskType: Standard_LRS
          storageProfileDataDisks:
            - lun: 0
              caching: ReadWrite
              createOption: Empty
              diskSizeGb: 10
          osProfile:
            computerNamePrefix: testvm
            adminUsername: myadmin
          osProfileLinuxConfig:
            disablePasswordAuthentication: true
            sshKeys:
              - path: /home/myadmin/.ssh/authorized_keys
                keyData:
                  fn::invoke:
                    Function: std:file
                    Arguments:
                      input: ~/.ssh/demo_key.pub
                    Return: result
          networkProfiles:
            - name: mynetworkprofile
              primary: true
              ipConfigurations:
                - name: TestIPConfiguration
                  primary: true
                  subnetId: ${exampleSubnet.id}
                  loadBalancerBackendAddressPoolIds:
                    - ${bpepool.id}
                  loadBalancerInboundNatRulesIds:
                    - ${lbnatpool.id}
          tags:
            environment: staging
    

    With Unmanaged Disks

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as std from "@pulumi/std";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "acctvn",
        addressSpaces: ["10.0.0.0/16"],
        location: example.location,
        resourceGroupName: example.name,
    });
    const exampleSubnet = new azure.network.Subnet("example", {
        name: "acctsub",
        resourceGroupName: example.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.2.0/24"],
    });
    const exampleAccount = new azure.storage.Account("example", {
        name: "accsa",
        resourceGroupName: example.name,
        location: example.location,
        accountTier: "Standard",
        accountReplicationType: "LRS",
        tags: {
            environment: "staging",
        },
    });
    const exampleContainer = new azure.storage.Container("example", {
        name: "vhds",
        storageAccountName: exampleAccount.name,
        containerAccessType: "private",
    });
    const exampleScaleSet = new azure.compute.ScaleSet("example", {
        name: "mytestscaleset-1",
        location: example.location,
        resourceGroupName: example.name,
        upgradePolicyMode: "Manual",
        sku: {
            name: "Standard_F2",
            tier: "Standard",
            capacity: 2,
        },
        osProfile: {
            computerNamePrefix: "testvm",
            adminUsername: "myadmin",
        },
        osProfileLinuxConfig: {
            disablePasswordAuthentication: true,
            sshKeys: [{
                path: "/home/myadmin/.ssh/authorized_keys",
                keyData: std.file({
                    input: "~/.ssh/demo_key.pub",
                }).then(invoke => invoke.result),
            }],
        },
        networkProfiles: [{
            name: "TestNetworkProfile",
            primary: true,
            ipConfigurations: [{
                name: "TestIPConfiguration",
                primary: true,
                subnetId: exampleSubnet.id,
            }],
        }],
        storageProfileOsDisk: {
            name: "osDiskProfile",
            caching: "ReadWrite",
            createOption: "FromImage",
            vhdContainers: [pulumi.interpolate`${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}`],
        },
        storageProfileImageReference: {
            publisher: "Canonical",
            offer: "0001-com-ubuntu-server-jammy",
            sku: "22_04-lts",
            version: "latest",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    import pulumi_std as std
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="acctvn",
        address_spaces=["10.0.0.0/16"],
        location=example.location,
        resource_group_name=example.name)
    example_subnet = azure.network.Subnet("example",
        name="acctsub",
        resource_group_name=example.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.2.0/24"])
    example_account = azure.storage.Account("example",
        name="accsa",
        resource_group_name=example.name,
        location=example.location,
        account_tier="Standard",
        account_replication_type="LRS",
        tags={
            "environment": "staging",
        })
    example_container = azure.storage.Container("example",
        name="vhds",
        storage_account_name=example_account.name,
        container_access_type="private")
    example_scale_set = azure.compute.ScaleSet("example",
        name="mytestscaleset-1",
        location=example.location,
        resource_group_name=example.name,
        upgrade_policy_mode="Manual",
        sku=azure.compute.ScaleSetSkuArgs(
            name="Standard_F2",
            tier="Standard",
            capacity=2,
        ),
        os_profile=azure.compute.ScaleSetOsProfileArgs(
            computer_name_prefix="testvm",
            admin_username="myadmin",
        ),
        os_profile_linux_config=azure.compute.ScaleSetOsProfileLinuxConfigArgs(
            disable_password_authentication=True,
            ssh_keys=[azure.compute.ScaleSetOsProfileLinuxConfigSshKeyArgs(
                path="/home/myadmin/.ssh/authorized_keys",
                key_data=std.file(input="~/.ssh/demo_key.pub").result,
            )],
        ),
        network_profiles=[azure.compute.ScaleSetNetworkProfileArgs(
            name="TestNetworkProfile",
            primary=True,
            ip_configurations=[azure.compute.ScaleSetNetworkProfileIpConfigurationArgs(
                name="TestIPConfiguration",
                primary=True,
                subnet_id=example_subnet.id,
            )],
        )],
        storage_profile_os_disk=azure.compute.ScaleSetStorageProfileOsDiskArgs(
            name="osDiskProfile",
            caching="ReadWrite",
            create_option="FromImage",
            vhd_containers=[pulumi.Output.all(example_account.primary_blob_endpoint, example_container.name).apply(lambda primary_blob_endpoint, name: f"{primary_blob_endpoint}{name}")],
        ),
        storage_profile_image_reference=azure.compute.ScaleSetStorageProfileImageReferenceArgs(
            publisher="Canonical",
            offer="0001-com-ubuntu-server-jammy",
            sku="22_04-lts",
            version="latest",
        ))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
    			Name: pulumi.String("acctvn"),
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
    			Name:               pulumi.String("acctsub"),
    			ResourceGroupName:  example.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.2.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
    			Name:                   pulumi.String("accsa"),
    			ResourceGroupName:      example.Name,
    			Location:               example.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountReplicationType: pulumi.String("LRS"),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("staging"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
    			Name:                pulumi.String("vhds"),
    			StorageAccountName:  exampleAccount.Name,
    			ContainerAccessType: pulumi.String("private"),
    		})
    		if err != nil {
    			return err
    		}
    		invokeFile, err := std.File(ctx, &std.FileArgs{
    			Input: "~/.ssh/demo_key.pub",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{
    			Name:              pulumi.String("mytestscaleset-1"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			UpgradePolicyMode: pulumi.String("Manual"),
    			Sku: &compute.ScaleSetSkuArgs{
    				Name:     pulumi.String("Standard_F2"),
    				Tier:     pulumi.String("Standard"),
    				Capacity: pulumi.Int(2),
    			},
    			OsProfile: &compute.ScaleSetOsProfileArgs{
    				ComputerNamePrefix: pulumi.String("testvm"),
    				AdminUsername:      pulumi.String("myadmin"),
    			},
    			OsProfileLinuxConfig: &compute.ScaleSetOsProfileLinuxConfigArgs{
    				DisablePasswordAuthentication: pulumi.Bool(true),
    				SshKeys: compute.ScaleSetOsProfileLinuxConfigSshKeyArray{
    					&compute.ScaleSetOsProfileLinuxConfigSshKeyArgs{
    						Path:    pulumi.String("/home/myadmin/.ssh/authorized_keys"),
    						KeyData: invokeFile.Result,
    					},
    				},
    			},
    			NetworkProfiles: compute.ScaleSetNetworkProfileArray{
    				&compute.ScaleSetNetworkProfileArgs{
    					Name:    pulumi.String("TestNetworkProfile"),
    					Primary: pulumi.Bool(true),
    					IpConfigurations: compute.ScaleSetNetworkProfileIpConfigurationArray{
    						&compute.ScaleSetNetworkProfileIpConfigurationArgs{
    							Name:     pulumi.String("TestIPConfiguration"),
    							Primary:  pulumi.Bool(true),
    							SubnetId: exampleSubnet.ID(),
    						},
    					},
    				},
    			},
    			StorageProfileOsDisk: &compute.ScaleSetStorageProfileOsDiskArgs{
    				Name:         pulumi.String("osDiskProfile"),
    				Caching:      pulumi.String("ReadWrite"),
    				CreateOption: pulumi.String("FromImage"),
    				VhdContainers: pulumi.StringArray{
    					pulumi.All(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).ApplyT(func(_args []interface{}) (string, error) {
    						primaryBlobEndpoint := _args[0].(string)
    						name := _args[1].(string)
    						return fmt.Sprintf("%v%v", primaryBlobEndpoint, name), nil
    					}).(pulumi.StringOutput),
    				},
    			},
    			StorageProfileImageReference: &compute.ScaleSetStorageProfileImageReferenceArgs{
    				Publisher: pulumi.String("Canonical"),
    				Offer:     pulumi.String("0001-com-ubuntu-server-jammy"),
    				Sku:       pulumi.String("22_04-lts"),
    				Version:   pulumi.String("latest"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "acctvn",
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var exampleSubnet = new Azure.Network.Subnet("example", new()
        {
            Name = "acctsub",
            ResourceGroupName = example.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.2.0/24",
            },
        });
    
        var exampleAccount = new Azure.Storage.Account("example", new()
        {
            Name = "accsa",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AccountTier = "Standard",
            AccountReplicationType = "LRS",
            Tags = 
            {
                { "environment", "staging" },
            },
        });
    
        var exampleContainer = new Azure.Storage.Container("example", new()
        {
            Name = "vhds",
            StorageAccountName = exampleAccount.Name,
            ContainerAccessType = "private",
        });
    
        var exampleScaleSet = new Azure.Compute.ScaleSet("example", new()
        {
            Name = "mytestscaleset-1",
            Location = example.Location,
            ResourceGroupName = example.Name,
            UpgradePolicyMode = "Manual",
            Sku = new Azure.Compute.Inputs.ScaleSetSkuArgs
            {
                Name = "Standard_F2",
                Tier = "Standard",
                Capacity = 2,
            },
            OsProfile = new Azure.Compute.Inputs.ScaleSetOsProfileArgs
            {
                ComputerNamePrefix = "testvm",
                AdminUsername = "myadmin",
            },
            OsProfileLinuxConfig = new Azure.Compute.Inputs.ScaleSetOsProfileLinuxConfigArgs
            {
                DisablePasswordAuthentication = true,
                SshKeys = new[]
                {
                    new Azure.Compute.Inputs.ScaleSetOsProfileLinuxConfigSshKeyArgs
                    {
                        Path = "/home/myadmin/.ssh/authorized_keys",
                        KeyData = Std.File.Invoke(new()
                        {
                            Input = "~/.ssh/demo_key.pub",
                        }).Apply(invoke => invoke.Result),
                    },
                },
            },
            NetworkProfiles = new[]
            {
                new Azure.Compute.Inputs.ScaleSetNetworkProfileArgs
                {
                    Name = "TestNetworkProfile",
                    Primary = true,
                    IpConfigurations = new[]
                    {
                        new Azure.Compute.Inputs.ScaleSetNetworkProfileIpConfigurationArgs
                        {
                            Name = "TestIPConfiguration",
                            Primary = true,
                            SubnetId = exampleSubnet.Id,
                        },
                    },
                },
            },
            StorageProfileOsDisk = new Azure.Compute.Inputs.ScaleSetStorageProfileOsDiskArgs
            {
                Name = "osDiskProfile",
                Caching = "ReadWrite",
                CreateOption = "FromImage",
                VhdContainers = new[]
                {
                    Output.Tuple(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).Apply(values =>
                    {
                        var primaryBlobEndpoint = values.Item1;
                        var name = values.Item2;
                        return $"{primaryBlobEndpoint}{name}";
                    }),
                },
            },
            StorageProfileImageReference = new Azure.Compute.Inputs.ScaleSetStorageProfileImageReferenceArgs
            {
                Publisher = "Canonical",
                Offer = "0001-com-ubuntu-server-jammy",
                Sku = "22_04-lts",
                Version = "latest",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.storage.Account;
    import com.pulumi.azure.storage.AccountArgs;
    import com.pulumi.azure.storage.Container;
    import com.pulumi.azure.storage.ContainerArgs;
    import com.pulumi.azure.compute.ScaleSet;
    import com.pulumi.azure.compute.ScaleSetArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetOsProfileArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetOsProfileLinuxConfigArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetNetworkProfileArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetStorageProfileOsDiskArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetStorageProfileImageReferenceArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
                .name("acctvn")
                .addressSpaces("10.0.0.0/16")
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
                .name("acctsub")
                .resourceGroupName(example.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.2.0/24")
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
                .name("accsa")
                .resourceGroupName(example.name())
                .location(example.location())
                .accountTier("Standard")
                .accountReplicationType("LRS")
                .tags(Map.of("environment", "staging"))
                .build());
    
            var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()        
                .name("vhds")
                .storageAccountName(exampleAccount.name())
                .containerAccessType("private")
                .build());
    
            var exampleScaleSet = new ScaleSet("exampleScaleSet", ScaleSetArgs.builder()        
                .name("mytestscaleset-1")
                .location(example.location())
                .resourceGroupName(example.name())
                .upgradePolicyMode("Manual")
                .sku(ScaleSetSkuArgs.builder()
                    .name("Standard_F2")
                    .tier("Standard")
                    .capacity(2)
                    .build())
                .osProfile(ScaleSetOsProfileArgs.builder()
                    .computerNamePrefix("testvm")
                    .adminUsername("myadmin")
                    .build())
                .osProfileLinuxConfig(ScaleSetOsProfileLinuxConfigArgs.builder()
                    .disablePasswordAuthentication(true)
                    .sshKeys(ScaleSetOsProfileLinuxConfigSshKeyArgs.builder()
                        .path("/home/myadmin/.ssh/authorized_keys")
                        .keyData(StdFunctions.file(FileArgs.builder()
                            .input("~/.ssh/demo_key.pub")
                            .build()).result())
                        .build())
                    .build())
                .networkProfiles(ScaleSetNetworkProfileArgs.builder()
                    .name("TestNetworkProfile")
                    .primary(true)
                    .ipConfigurations(ScaleSetNetworkProfileIpConfigurationArgs.builder()
                        .name("TestIPConfiguration")
                        .primary(true)
                        .subnetId(exampleSubnet.id())
                        .build())
                    .build())
                .storageProfileOsDisk(ScaleSetStorageProfileOsDiskArgs.builder()
                    .name("osDiskProfile")
                    .caching("ReadWrite")
                    .createOption("FromImage")
                    .vhdContainers(Output.tuple(exampleAccount.primaryBlobEndpoint(), exampleContainer.name()).applyValue(values -> {
                        var primaryBlobEndpoint = values.t1;
                        var name = values.t2;
                        return String.format("%s%s", primaryBlobEndpoint,name);
                    }))
                    .build())
                .storageProfileImageReference(ScaleSetStorageProfileImageReferenceArgs.builder()
                    .publisher("Canonical")
                    .offer("0001-com-ubuntu-server-jammy")
                    .sku("22_04-lts")
                    .version("latest")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: acctvn
          addressSpaces:
            - 10.0.0.0/16
          location: ${example.location}
          resourceGroupName: ${example.name}
      exampleSubnet:
        type: azure:network:Subnet
        name: example
        properties:
          name: acctsub
          resourceGroupName: ${example.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.2.0/24
      exampleAccount:
        type: azure:storage:Account
        name: example
        properties:
          name: accsa
          resourceGroupName: ${example.name}
          location: ${example.location}
          accountTier: Standard
          accountReplicationType: LRS
          tags:
            environment: staging
      exampleContainer:
        type: azure:storage:Container
        name: example
        properties:
          name: vhds
          storageAccountName: ${exampleAccount.name}
          containerAccessType: private
      exampleScaleSet:
        type: azure:compute:ScaleSet
        name: example
        properties:
          name: mytestscaleset-1
          location: ${example.location}
          resourceGroupName: ${example.name}
          upgradePolicyMode: Manual
          sku:
            name: Standard_F2
            tier: Standard
            capacity: 2
          osProfile:
            computerNamePrefix: testvm
            adminUsername: myadmin
          osProfileLinuxConfig:
            disablePasswordAuthentication: true
            sshKeys:
              - path: /home/myadmin/.ssh/authorized_keys
                keyData:
                  fn::invoke:
                    Function: std:file
                    Arguments:
                      input: ~/.ssh/demo_key.pub
                    Return: result
          networkProfiles:
            - name: TestNetworkProfile
              primary: true
              ipConfigurations:
                - name: TestIPConfiguration
                  primary: true
                  subnetId: ${exampleSubnet.id}
          storageProfileOsDisk:
            name: osDiskProfile
            caching: ReadWrite
            createOption: FromImage
            vhdContainers:
              - ${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}
          storageProfileImageReference:
            publisher: Canonical
            offer: 0001-com-ubuntu-server-jammy
            sku: 22_04-lts
            version: latest
    

    Example of storage_profile_image_reference with id

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.compute.Image("example", {name: "test"});
    const exampleScaleSet = new azure.compute.ScaleSet("example", {
        name: "test",
        storageProfileImageReference: {
            id: example.id,
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.Image("example", name="test")
    example_scale_set = azure.compute.ScaleSet("example",
        name="test",
        storage_profile_image_reference=azure.compute.ScaleSetStorageProfileImageReferenceArgs(
            id=example.id,
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.NewImage(ctx, "example", &compute.ImageArgs{
    			Name: pulumi.String("test"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{
    			Name: pulumi.String("test"),
    			StorageProfileImageReference: &compute.ScaleSetStorageProfileImageReferenceArgs{
    				Id: example.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Compute.Image("example", new()
        {
            Name = "test",
        });
    
        var exampleScaleSet = new Azure.Compute.ScaleSet("example", new()
        {
            Name = "test",
            StorageProfileImageReference = new Azure.Compute.Inputs.ScaleSetStorageProfileImageReferenceArgs
            {
                Id = example.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.compute.Image;
    import com.pulumi.azure.compute.ImageArgs;
    import com.pulumi.azure.compute.ScaleSet;
    import com.pulumi.azure.compute.ScaleSetArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetStorageProfileImageReferenceArgs;
    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 example = new Image("example", ImageArgs.builder()        
                .name("test")
                .build());
    
            var exampleScaleSet = new ScaleSet("exampleScaleSet", ScaleSetArgs.builder()        
                .name("test")
                .storageProfileImageReference(ScaleSetStorageProfileImageReferenceArgs.builder()
                    .id(example.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:compute:Image
        properties:
          name: test
      exampleScaleSet:
        type: azure:compute:ScaleSet
        name: example
        properties:
          name: test
          storageProfileImageReference:
            id: ${example.id}
    

    Create ScaleSet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ScaleSet(name: string, args: ScaleSetArgs, opts?: CustomResourceOptions);
    @overload
    def ScaleSet(resource_name: str,
                 args: ScaleSetArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScaleSet(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 network_profiles: Optional[Sequence[ScaleSetNetworkProfileArgs]] = None,
                 upgrade_policy_mode: Optional[str] = None,
                 storage_profile_os_disk: Optional[ScaleSetStorageProfileOsDiskArgs] = None,
                 sku: Optional[ScaleSetSkuArgs] = None,
                 resource_group_name: Optional[str] = None,
                 os_profile: Optional[ScaleSetOsProfileArgs] = None,
                 location: Optional[str] = None,
                 proximity_placement_group_id: Optional[str] = None,
                 name: Optional[str] = None,
                 license_type: Optional[str] = None,
                 identity: Optional[ScaleSetIdentityArgs] = None,
                 os_profile_linux_config: Optional[ScaleSetOsProfileLinuxConfigArgs] = None,
                 os_profile_secrets: Optional[Sequence[ScaleSetOsProfileSecretArgs]] = None,
                 os_profile_windows_config: Optional[ScaleSetOsProfileWindowsConfigArgs] = None,
                 overprovision: Optional[bool] = None,
                 plan: Optional[ScaleSetPlanArgs] = None,
                 priority: Optional[str] = None,
                 automatic_os_upgrade: Optional[bool] = None,
                 health_probe_id: Optional[str] = None,
                 rolling_upgrade_policy: Optional[ScaleSetRollingUpgradePolicyArgs] = None,
                 single_placement_group: Optional[bool] = None,
                 extensions: Optional[Sequence[ScaleSetExtensionArgs]] = None,
                 storage_profile_data_disks: Optional[Sequence[ScaleSetStorageProfileDataDiskArgs]] = None,
                 storage_profile_image_reference: Optional[ScaleSetStorageProfileImageReferenceArgs] = None,
                 eviction_policy: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 boot_diagnostics: Optional[ScaleSetBootDiagnosticsArgs] = None,
                 zones: Optional[Sequence[str]] = None)
    func NewScaleSet(ctx *Context, name string, args ScaleSetArgs, opts ...ResourceOption) (*ScaleSet, error)
    public ScaleSet(string name, ScaleSetArgs args, CustomResourceOptions? opts = null)
    public ScaleSet(String name, ScaleSetArgs args)
    public ScaleSet(String name, ScaleSetArgs args, CustomResourceOptions options)
    
    type: azure:compute:ScaleSet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ScaleSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ScaleSetArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ScaleSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScaleSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScaleSetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var scaleSetResource = new Azure.Compute.ScaleSet("scaleSetResource", new()
    {
        NetworkProfiles = new[]
        {
            new Azure.Compute.Inputs.ScaleSetNetworkProfileArgs
            {
                IpConfigurations = new[]
                {
                    new Azure.Compute.Inputs.ScaleSetNetworkProfileIpConfigurationArgs
                    {
                        Name = "string",
                        Primary = false,
                        SubnetId = "string",
                        ApplicationGatewayBackendAddressPoolIds = new[]
                        {
                            "string",
                        },
                        ApplicationSecurityGroupIds = new[]
                        {
                            "string",
                        },
                        LoadBalancerBackendAddressPoolIds = new[]
                        {
                            "string",
                        },
                        LoadBalancerInboundNatRulesIds = new[]
                        {
                            "string",
                        },
                        PublicIpAddressConfiguration = new Azure.Compute.Inputs.ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfigurationArgs
                        {
                            DomainNameLabel = "string",
                            IdleTimeout = 0,
                            Name = "string",
                        },
                    },
                },
                Name = "string",
                Primary = false,
                AcceleratedNetworking = false,
                DnsSettings = new Azure.Compute.Inputs.ScaleSetNetworkProfileDnsSettingsArgs
                {
                    DnsServers = new[]
                    {
                        "string",
                    },
                },
                IpForwarding = false,
                NetworkSecurityGroupId = "string",
            },
        },
        UpgradePolicyMode = "string",
        StorageProfileOsDisk = new Azure.Compute.Inputs.ScaleSetStorageProfileOsDiskArgs
        {
            CreateOption = "string",
            Caching = "string",
            Image = "string",
            ManagedDiskType = "string",
            Name = "string",
            OsType = "string",
            VhdContainers = new[]
            {
                "string",
            },
        },
        Sku = new Azure.Compute.Inputs.ScaleSetSkuArgs
        {
            Capacity = 0,
            Name = "string",
            Tier = "string",
        },
        ResourceGroupName = "string",
        OsProfile = new Azure.Compute.Inputs.ScaleSetOsProfileArgs
        {
            AdminUsername = "string",
            ComputerNamePrefix = "string",
            AdminPassword = "string",
            CustomData = "string",
        },
        Location = "string",
        ProximityPlacementGroupId = "string",
        Name = "string",
        LicenseType = "string",
        Identity = new Azure.Compute.Inputs.ScaleSetIdentityArgs
        {
            Type = "string",
            IdentityIds = new[]
            {
                "string",
            },
            PrincipalId = "string",
        },
        OsProfileLinuxConfig = new Azure.Compute.Inputs.ScaleSetOsProfileLinuxConfigArgs
        {
            DisablePasswordAuthentication = false,
            SshKeys = new[]
            {
                new Azure.Compute.Inputs.ScaleSetOsProfileLinuxConfigSshKeyArgs
                {
                    Path = "string",
                    KeyData = "string",
                },
            },
        },
        OsProfileSecrets = new[]
        {
            new Azure.Compute.Inputs.ScaleSetOsProfileSecretArgs
            {
                SourceVaultId = "string",
                VaultCertificates = new[]
                {
                    new Azure.Compute.Inputs.ScaleSetOsProfileSecretVaultCertificateArgs
                    {
                        CertificateUrl = "string",
                        CertificateStore = "string",
                    },
                },
            },
        },
        OsProfileWindowsConfig = new Azure.Compute.Inputs.ScaleSetOsProfileWindowsConfigArgs
        {
            AdditionalUnattendConfigs = new[]
            {
                new Azure.Compute.Inputs.ScaleSetOsProfileWindowsConfigAdditionalUnattendConfigArgs
                {
                    Component = "string",
                    Content = "string",
                    Pass = "string",
                    SettingName = "string",
                },
            },
            EnableAutomaticUpgrades = false,
            ProvisionVmAgent = false,
            Winrms = new[]
            {
                new Azure.Compute.Inputs.ScaleSetOsProfileWindowsConfigWinrmArgs
                {
                    Protocol = "string",
                    CertificateUrl = "string",
                },
            },
        },
        Overprovision = false,
        Plan = new Azure.Compute.Inputs.ScaleSetPlanArgs
        {
            Name = "string",
            Product = "string",
            Publisher = "string",
        },
        Priority = "string",
        AutomaticOsUpgrade = false,
        HealthProbeId = "string",
        RollingUpgradePolicy = new Azure.Compute.Inputs.ScaleSetRollingUpgradePolicyArgs
        {
            MaxBatchInstancePercent = 0,
            MaxUnhealthyInstancePercent = 0,
            MaxUnhealthyUpgradedInstancePercent = 0,
            PauseTimeBetweenBatches = "string",
        },
        SinglePlacementGroup = false,
        Extensions = new[]
        {
            new Azure.Compute.Inputs.ScaleSetExtensionArgs
            {
                Name = "string",
                Publisher = "string",
                Type = "string",
                TypeHandlerVersion = "string",
                AutoUpgradeMinorVersion = false,
                ProtectedSettings = "string",
                ProvisionAfterExtensions = new[]
                {
                    "string",
                },
                Settings = "string",
            },
        },
        StorageProfileDataDisks = new[]
        {
            new Azure.Compute.Inputs.ScaleSetStorageProfileDataDiskArgs
            {
                CreateOption = "string",
                Lun = 0,
                Caching = "string",
                DiskSizeGb = 0,
                ManagedDiskType = "string",
            },
        },
        StorageProfileImageReference = new Azure.Compute.Inputs.ScaleSetStorageProfileImageReferenceArgs
        {
            Id = "string",
            Offer = "string",
            Publisher = "string",
            Sku = "string",
            Version = "string",
        },
        EvictionPolicy = "string",
        Tags = 
        {
            { "string", "string" },
        },
        BootDiagnostics = new Azure.Compute.Inputs.ScaleSetBootDiagnosticsArgs
        {
            StorageUri = "string",
            Enabled = false,
        },
        Zones = new[]
        {
            "string",
        },
    });
    
    example, err := compute.NewScaleSet(ctx, "scaleSetResource", &compute.ScaleSetArgs{
    	NetworkProfiles: compute.ScaleSetNetworkProfileArray{
    		&compute.ScaleSetNetworkProfileArgs{
    			IpConfigurations: compute.ScaleSetNetworkProfileIpConfigurationArray{
    				&compute.ScaleSetNetworkProfileIpConfigurationArgs{
    					Name:     pulumi.String("string"),
    					Primary:  pulumi.Bool(false),
    					SubnetId: pulumi.String("string"),
    					ApplicationGatewayBackendAddressPoolIds: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					ApplicationSecurityGroupIds: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					LoadBalancerBackendAddressPoolIds: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					LoadBalancerInboundNatRulesIds: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					PublicIpAddressConfiguration: &compute.ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfigurationArgs{
    						DomainNameLabel: pulumi.String("string"),
    						IdleTimeout:     pulumi.Int(0),
    						Name:            pulumi.String("string"),
    					},
    				},
    			},
    			Name:                  pulumi.String("string"),
    			Primary:               pulumi.Bool(false),
    			AcceleratedNetworking: pulumi.Bool(false),
    			DnsSettings: &compute.ScaleSetNetworkProfileDnsSettingsArgs{
    				DnsServers: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    			IpForwarding:           pulumi.Bool(false),
    			NetworkSecurityGroupId: pulumi.String("string"),
    		},
    	},
    	UpgradePolicyMode: pulumi.String("string"),
    	StorageProfileOsDisk: &compute.ScaleSetStorageProfileOsDiskArgs{
    		CreateOption:    pulumi.String("string"),
    		Caching:         pulumi.String("string"),
    		Image:           pulumi.String("string"),
    		ManagedDiskType: pulumi.String("string"),
    		Name:            pulumi.String("string"),
    		OsType:          pulumi.String("string"),
    		VhdContainers: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Sku: &compute.ScaleSetSkuArgs{
    		Capacity: pulumi.Int(0),
    		Name:     pulumi.String("string"),
    		Tier:     pulumi.String("string"),
    	},
    	ResourceGroupName: pulumi.String("string"),
    	OsProfile: &compute.ScaleSetOsProfileArgs{
    		AdminUsername:      pulumi.String("string"),
    		ComputerNamePrefix: pulumi.String("string"),
    		AdminPassword:      pulumi.String("string"),
    		CustomData:         pulumi.String("string"),
    	},
    	Location:                  pulumi.String("string"),
    	ProximityPlacementGroupId: pulumi.String("string"),
    	Name:                      pulumi.String("string"),
    	LicenseType:               pulumi.String("string"),
    	Identity: &compute.ScaleSetIdentityArgs{
    		Type: pulumi.String("string"),
    		IdentityIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		PrincipalId: pulumi.String("string"),
    	},
    	OsProfileLinuxConfig: &compute.ScaleSetOsProfileLinuxConfigArgs{
    		DisablePasswordAuthentication: pulumi.Bool(false),
    		SshKeys: compute.ScaleSetOsProfileLinuxConfigSshKeyArray{
    			&compute.ScaleSetOsProfileLinuxConfigSshKeyArgs{
    				Path:    pulumi.String("string"),
    				KeyData: pulumi.String("string"),
    			},
    		},
    	},
    	OsProfileSecrets: compute.ScaleSetOsProfileSecretArray{
    		&compute.ScaleSetOsProfileSecretArgs{
    			SourceVaultId: pulumi.String("string"),
    			VaultCertificates: compute.ScaleSetOsProfileSecretVaultCertificateArray{
    				&compute.ScaleSetOsProfileSecretVaultCertificateArgs{
    					CertificateUrl:   pulumi.String("string"),
    					CertificateStore: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	OsProfileWindowsConfig: &compute.ScaleSetOsProfileWindowsConfigArgs{
    		AdditionalUnattendConfigs: compute.ScaleSetOsProfileWindowsConfigAdditionalUnattendConfigArray{
    			&compute.ScaleSetOsProfileWindowsConfigAdditionalUnattendConfigArgs{
    				Component:   pulumi.String("string"),
    				Content:     pulumi.String("string"),
    				Pass:        pulumi.String("string"),
    				SettingName: pulumi.String("string"),
    			},
    		},
    		EnableAutomaticUpgrades: pulumi.Bool(false),
    		ProvisionVmAgent:        pulumi.Bool(false),
    		Winrms: compute.ScaleSetOsProfileWindowsConfigWinrmArray{
    			&compute.ScaleSetOsProfileWindowsConfigWinrmArgs{
    				Protocol:       pulumi.String("string"),
    				CertificateUrl: pulumi.String("string"),
    			},
    		},
    	},
    	Overprovision: pulumi.Bool(false),
    	Plan: &compute.ScaleSetPlanArgs{
    		Name:      pulumi.String("string"),
    		Product:   pulumi.String("string"),
    		Publisher: pulumi.String("string"),
    	},
    	Priority:           pulumi.String("string"),
    	AutomaticOsUpgrade: pulumi.Bool(false),
    	HealthProbeId:      pulumi.String("string"),
    	RollingUpgradePolicy: &compute.ScaleSetRollingUpgradePolicyArgs{
    		MaxBatchInstancePercent:             pulumi.Int(0),
    		MaxUnhealthyInstancePercent:         pulumi.Int(0),
    		MaxUnhealthyUpgradedInstancePercent: pulumi.Int(0),
    		PauseTimeBetweenBatches:             pulumi.String("string"),
    	},
    	SinglePlacementGroup: pulumi.Bool(false),
    	Extensions: compute.ScaleSetExtensionArray{
    		&compute.ScaleSetExtensionArgs{
    			Name:                    pulumi.String("string"),
    			Publisher:               pulumi.String("string"),
    			Type:                    pulumi.String("string"),
    			TypeHandlerVersion:      pulumi.String("string"),
    			AutoUpgradeMinorVersion: pulumi.Bool(false),
    			ProtectedSettings:       pulumi.String("string"),
    			ProvisionAfterExtensions: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Settings: pulumi.String("string"),
    		},
    	},
    	StorageProfileDataDisks: compute.ScaleSetStorageProfileDataDiskArray{
    		&compute.ScaleSetStorageProfileDataDiskArgs{
    			CreateOption:    pulumi.String("string"),
    			Lun:             pulumi.Int(0),
    			Caching:         pulumi.String("string"),
    			DiskSizeGb:      pulumi.Int(0),
    			ManagedDiskType: pulumi.String("string"),
    		},
    	},
    	StorageProfileImageReference: &compute.ScaleSetStorageProfileImageReferenceArgs{
    		Id:        pulumi.String("string"),
    		Offer:     pulumi.String("string"),
    		Publisher: pulumi.String("string"),
    		Sku:       pulumi.String("string"),
    		Version:   pulumi.String("string"),
    	},
    	EvictionPolicy: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	BootDiagnostics: &compute.ScaleSetBootDiagnosticsArgs{
    		StorageUri: pulumi.String("string"),
    		Enabled:    pulumi.Bool(false),
    	},
    	Zones: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var scaleSetResource = new ScaleSet("scaleSetResource", ScaleSetArgs.builder()        
        .networkProfiles(ScaleSetNetworkProfileArgs.builder()
            .ipConfigurations(ScaleSetNetworkProfileIpConfigurationArgs.builder()
                .name("string")
                .primary(false)
                .subnetId("string")
                .applicationGatewayBackendAddressPoolIds("string")
                .applicationSecurityGroupIds("string")
                .loadBalancerBackendAddressPoolIds("string")
                .loadBalancerInboundNatRulesIds("string")
                .publicIpAddressConfiguration(ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfigurationArgs.builder()
                    .domainNameLabel("string")
                    .idleTimeout(0)
                    .name("string")
                    .build())
                .build())
            .name("string")
            .primary(false)
            .acceleratedNetworking(false)
            .dnsSettings(ScaleSetNetworkProfileDnsSettingsArgs.builder()
                .dnsServers("string")
                .build())
            .ipForwarding(false)
            .networkSecurityGroupId("string")
            .build())
        .upgradePolicyMode("string")
        .storageProfileOsDisk(ScaleSetStorageProfileOsDiskArgs.builder()
            .createOption("string")
            .caching("string")
            .image("string")
            .managedDiskType("string")
            .name("string")
            .osType("string")
            .vhdContainers("string")
            .build())
        .sku(ScaleSetSkuArgs.builder()
            .capacity(0)
            .name("string")
            .tier("string")
            .build())
        .resourceGroupName("string")
        .osProfile(ScaleSetOsProfileArgs.builder()
            .adminUsername("string")
            .computerNamePrefix("string")
            .adminPassword("string")
            .customData("string")
            .build())
        .location("string")
        .proximityPlacementGroupId("string")
        .name("string")
        .licenseType("string")
        .identity(ScaleSetIdentityArgs.builder()
            .type("string")
            .identityIds("string")
            .principalId("string")
            .build())
        .osProfileLinuxConfig(ScaleSetOsProfileLinuxConfigArgs.builder()
            .disablePasswordAuthentication(false)
            .sshKeys(ScaleSetOsProfileLinuxConfigSshKeyArgs.builder()
                .path("string")
                .keyData("string")
                .build())
            .build())
        .osProfileSecrets(ScaleSetOsProfileSecretArgs.builder()
            .sourceVaultId("string")
            .vaultCertificates(ScaleSetOsProfileSecretVaultCertificateArgs.builder()
                .certificateUrl("string")
                .certificateStore("string")
                .build())
            .build())
        .osProfileWindowsConfig(ScaleSetOsProfileWindowsConfigArgs.builder()
            .additionalUnattendConfigs(ScaleSetOsProfileWindowsConfigAdditionalUnattendConfigArgs.builder()
                .component("string")
                .content("string")
                .pass("string")
                .settingName("string")
                .build())
            .enableAutomaticUpgrades(false)
            .provisionVmAgent(false)
            .winrms(ScaleSetOsProfileWindowsConfigWinrmArgs.builder()
                .protocol("string")
                .certificateUrl("string")
                .build())
            .build())
        .overprovision(false)
        .plan(ScaleSetPlanArgs.builder()
            .name("string")
            .product("string")
            .publisher("string")
            .build())
        .priority("string")
        .automaticOsUpgrade(false)
        .healthProbeId("string")
        .rollingUpgradePolicy(ScaleSetRollingUpgradePolicyArgs.builder()
            .maxBatchInstancePercent(0)
            .maxUnhealthyInstancePercent(0)
            .maxUnhealthyUpgradedInstancePercent(0)
            .pauseTimeBetweenBatches("string")
            .build())
        .singlePlacementGroup(false)
        .extensions(ScaleSetExtensionArgs.builder()
            .name("string")
            .publisher("string")
            .type("string")
            .typeHandlerVersion("string")
            .autoUpgradeMinorVersion(false)
            .protectedSettings("string")
            .provisionAfterExtensions("string")
            .settings("string")
            .build())
        .storageProfileDataDisks(ScaleSetStorageProfileDataDiskArgs.builder()
            .createOption("string")
            .lun(0)
            .caching("string")
            .diskSizeGb(0)
            .managedDiskType("string")
            .build())
        .storageProfileImageReference(ScaleSetStorageProfileImageReferenceArgs.builder()
            .id("string")
            .offer("string")
            .publisher("string")
            .sku("string")
            .version("string")
            .build())
        .evictionPolicy("string")
        .tags(Map.of("string", "string"))
        .bootDiagnostics(ScaleSetBootDiagnosticsArgs.builder()
            .storageUri("string")
            .enabled(false)
            .build())
        .zones("string")
        .build());
    
    scale_set_resource = azure.compute.ScaleSet("scaleSetResource",
        network_profiles=[azure.compute.ScaleSetNetworkProfileArgs(
            ip_configurations=[azure.compute.ScaleSetNetworkProfileIpConfigurationArgs(
                name="string",
                primary=False,
                subnet_id="string",
                application_gateway_backend_address_pool_ids=["string"],
                application_security_group_ids=["string"],
                load_balancer_backend_address_pool_ids=["string"],
                load_balancer_inbound_nat_rules_ids=["string"],
                public_ip_address_configuration=azure.compute.ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfigurationArgs(
                    domain_name_label="string",
                    idle_timeout=0,
                    name="string",
                ),
            )],
            name="string",
            primary=False,
            accelerated_networking=False,
            dns_settings=azure.compute.ScaleSetNetworkProfileDnsSettingsArgs(
                dns_servers=["string"],
            ),
            ip_forwarding=False,
            network_security_group_id="string",
        )],
        upgrade_policy_mode="string",
        storage_profile_os_disk=azure.compute.ScaleSetStorageProfileOsDiskArgs(
            create_option="string",
            caching="string",
            image="string",
            managed_disk_type="string",
            name="string",
            os_type="string",
            vhd_containers=["string"],
        ),
        sku=azure.compute.ScaleSetSkuArgs(
            capacity=0,
            name="string",
            tier="string",
        ),
        resource_group_name="string",
        os_profile=azure.compute.ScaleSetOsProfileArgs(
            admin_username="string",
            computer_name_prefix="string",
            admin_password="string",
            custom_data="string",
        ),
        location="string",
        proximity_placement_group_id="string",
        name="string",
        license_type="string",
        identity=azure.compute.ScaleSetIdentityArgs(
            type="string",
            identity_ids=["string"],
            principal_id="string",
        ),
        os_profile_linux_config=azure.compute.ScaleSetOsProfileLinuxConfigArgs(
            disable_password_authentication=False,
            ssh_keys=[azure.compute.ScaleSetOsProfileLinuxConfigSshKeyArgs(
                path="string",
                key_data="string",
            )],
        ),
        os_profile_secrets=[azure.compute.ScaleSetOsProfileSecretArgs(
            source_vault_id="string",
            vault_certificates=[azure.compute.ScaleSetOsProfileSecretVaultCertificateArgs(
                certificate_url="string",
                certificate_store="string",
            )],
        )],
        os_profile_windows_config=azure.compute.ScaleSetOsProfileWindowsConfigArgs(
            additional_unattend_configs=[azure.compute.ScaleSetOsProfileWindowsConfigAdditionalUnattendConfigArgs(
                component="string",
                content="string",
                pass_="string",
                setting_name="string",
            )],
            enable_automatic_upgrades=False,
            provision_vm_agent=False,
            winrms=[azure.compute.ScaleSetOsProfileWindowsConfigWinrmArgs(
                protocol="string",
                certificate_url="string",
            )],
        ),
        overprovision=False,
        plan=azure.compute.ScaleSetPlanArgs(
            name="string",
            product="string",
            publisher="string",
        ),
        priority="string",
        automatic_os_upgrade=False,
        health_probe_id="string",
        rolling_upgrade_policy=azure.compute.ScaleSetRollingUpgradePolicyArgs(
            max_batch_instance_percent=0,
            max_unhealthy_instance_percent=0,
            max_unhealthy_upgraded_instance_percent=0,
            pause_time_between_batches="string",
        ),
        single_placement_group=False,
        extensions=[azure.compute.ScaleSetExtensionArgs(
            name="string",
            publisher="string",
            type="string",
            type_handler_version="string",
            auto_upgrade_minor_version=False,
            protected_settings="string",
            provision_after_extensions=["string"],
            settings="string",
        )],
        storage_profile_data_disks=[azure.compute.ScaleSetStorageProfileDataDiskArgs(
            create_option="string",
            lun=0,
            caching="string",
            disk_size_gb=0,
            managed_disk_type="string",
        )],
        storage_profile_image_reference=azure.compute.ScaleSetStorageProfileImageReferenceArgs(
            id="string",
            offer="string",
            publisher="string",
            sku="string",
            version="string",
        ),
        eviction_policy="string",
        tags={
            "string": "string",
        },
        boot_diagnostics=azure.compute.ScaleSetBootDiagnosticsArgs(
            storage_uri="string",
            enabled=False,
        ),
        zones=["string"])
    
    const scaleSetResource = new azure.compute.ScaleSet("scaleSetResource", {
        networkProfiles: [{
            ipConfigurations: [{
                name: "string",
                primary: false,
                subnetId: "string",
                applicationGatewayBackendAddressPoolIds: ["string"],
                applicationSecurityGroupIds: ["string"],
                loadBalancerBackendAddressPoolIds: ["string"],
                loadBalancerInboundNatRulesIds: ["string"],
                publicIpAddressConfiguration: {
                    domainNameLabel: "string",
                    idleTimeout: 0,
                    name: "string",
                },
            }],
            name: "string",
            primary: false,
            acceleratedNetworking: false,
            dnsSettings: {
                dnsServers: ["string"],
            },
            ipForwarding: false,
            networkSecurityGroupId: "string",
        }],
        upgradePolicyMode: "string",
        storageProfileOsDisk: {
            createOption: "string",
            caching: "string",
            image: "string",
            managedDiskType: "string",
            name: "string",
            osType: "string",
            vhdContainers: ["string"],
        },
        sku: {
            capacity: 0,
            name: "string",
            tier: "string",
        },
        resourceGroupName: "string",
        osProfile: {
            adminUsername: "string",
            computerNamePrefix: "string",
            adminPassword: "string",
            customData: "string",
        },
        location: "string",
        proximityPlacementGroupId: "string",
        name: "string",
        licenseType: "string",
        identity: {
            type: "string",
            identityIds: ["string"],
            principalId: "string",
        },
        osProfileLinuxConfig: {
            disablePasswordAuthentication: false,
            sshKeys: [{
                path: "string",
                keyData: "string",
            }],
        },
        osProfileSecrets: [{
            sourceVaultId: "string",
            vaultCertificates: [{
                certificateUrl: "string",
                certificateStore: "string",
            }],
        }],
        osProfileWindowsConfig: {
            additionalUnattendConfigs: [{
                component: "string",
                content: "string",
                pass: "string",
                settingName: "string",
            }],
            enableAutomaticUpgrades: false,
            provisionVmAgent: false,
            winrms: [{
                protocol: "string",
                certificateUrl: "string",
            }],
        },
        overprovision: false,
        plan: {
            name: "string",
            product: "string",
            publisher: "string",
        },
        priority: "string",
        automaticOsUpgrade: false,
        healthProbeId: "string",
        rollingUpgradePolicy: {
            maxBatchInstancePercent: 0,
            maxUnhealthyInstancePercent: 0,
            maxUnhealthyUpgradedInstancePercent: 0,
            pauseTimeBetweenBatches: "string",
        },
        singlePlacementGroup: false,
        extensions: [{
            name: "string",
            publisher: "string",
            type: "string",
            typeHandlerVersion: "string",
            autoUpgradeMinorVersion: false,
            protectedSettings: "string",
            provisionAfterExtensions: ["string"],
            settings: "string",
        }],
        storageProfileDataDisks: [{
            createOption: "string",
            lun: 0,
            caching: "string",
            diskSizeGb: 0,
            managedDiskType: "string",
        }],
        storageProfileImageReference: {
            id: "string",
            offer: "string",
            publisher: "string",
            sku: "string",
            version: "string",
        },
        evictionPolicy: "string",
        tags: {
            string: "string",
        },
        bootDiagnostics: {
            storageUri: "string",
            enabled: false,
        },
        zones: ["string"],
    });
    
    type: azure:compute:ScaleSet
    properties:
        automaticOsUpgrade: false
        bootDiagnostics:
            enabled: false
            storageUri: string
        evictionPolicy: string
        extensions:
            - autoUpgradeMinorVersion: false
              name: string
              protectedSettings: string
              provisionAfterExtensions:
                - string
              publisher: string
              settings: string
              type: string
              typeHandlerVersion: string
        healthProbeId: string
        identity:
            identityIds:
                - string
            principalId: string
            type: string
        licenseType: string
        location: string
        name: string
        networkProfiles:
            - acceleratedNetworking: false
              dnsSettings:
                dnsServers:
                    - string
              ipConfigurations:
                - applicationGatewayBackendAddressPoolIds:
                    - string
                  applicationSecurityGroupIds:
                    - string
                  loadBalancerBackendAddressPoolIds:
                    - string
                  loadBalancerInboundNatRulesIds:
                    - string
                  name: string
                  primary: false
                  publicIpAddressConfiguration:
                    domainNameLabel: string
                    idleTimeout: 0
                    name: string
                  subnetId: string
              ipForwarding: false
              name: string
              networkSecurityGroupId: string
              primary: false
        osProfile:
            adminPassword: string
            adminUsername: string
            computerNamePrefix: string
            customData: string
        osProfileLinuxConfig:
            disablePasswordAuthentication: false
            sshKeys:
                - keyData: string
                  path: string
        osProfileSecrets:
            - sourceVaultId: string
              vaultCertificates:
                - certificateStore: string
                  certificateUrl: string
        osProfileWindowsConfig:
            additionalUnattendConfigs:
                - component: string
                  content: string
                  pass: string
                  settingName: string
            enableAutomaticUpgrades: false
            provisionVmAgent: false
            winrms:
                - certificateUrl: string
                  protocol: string
        overprovision: false
        plan:
            name: string
            product: string
            publisher: string
        priority: string
        proximityPlacementGroupId: string
        resourceGroupName: string
        rollingUpgradePolicy:
            maxBatchInstancePercent: 0
            maxUnhealthyInstancePercent: 0
            maxUnhealthyUpgradedInstancePercent: 0
            pauseTimeBetweenBatches: string
        singlePlacementGroup: false
        sku:
            capacity: 0
            name: string
            tier: string
        storageProfileDataDisks:
            - caching: string
              createOption: string
              diskSizeGb: 0
              lun: 0
              managedDiskType: string
        storageProfileImageReference:
            id: string
            offer: string
            publisher: string
            sku: string
            version: string
        storageProfileOsDisk:
            caching: string
            createOption: string
            image: string
            managedDiskType: string
            name: string
            osType: string
            vhdContainers:
                - string
        tags:
            string: string
        upgradePolicyMode: string
        zones:
            - string
    

    ScaleSet Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ScaleSet resource accepts the following input properties:

    NetworkProfiles List<ScaleSetNetworkProfile>
    A collection of network_profile blocks as documented below.
    OsProfile ScaleSetOsProfile
    A os_profile block as documented below.
    ResourceGroupName string
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    Sku ScaleSetSku
    A sku block as documented below.
    StorageProfileOsDisk ScaleSetStorageProfileOsDisk
    A storage_profile_os_disk block as documented below.
    UpgradePolicyMode string
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    AutomaticOsUpgrade bool
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    BootDiagnostics ScaleSetBootDiagnostics
    A boot_diagnostics block as referenced below.
    EvictionPolicy string

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    Extensions List<ScaleSetExtension>
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    HealthProbeId string
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    Identity ScaleSetIdentity
    An identity block as defined below.
    LicenseType string
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    OsProfileLinuxConfig ScaleSetOsProfileLinuxConfig
    A os_profile_linux_config block as documented below.
    OsProfileSecrets List<ScaleSetOsProfileSecret>
    A collection of os_profile_secrets blocks as documented below.
    OsProfileWindowsConfig ScaleSetOsProfileWindowsConfig
    A os_profile_windows_config block as documented below.
    Overprovision bool
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    Plan ScaleSetPlan
    A plan block as documented below.
    Priority string
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    ProximityPlacementGroupId string
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    RollingUpgradePolicy ScaleSetRollingUpgradePolicy
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    SinglePlacementGroup bool
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    StorageProfileDataDisks List<ScaleSetStorageProfileDataDisk>
    A storage_profile_data_disk block as documented below.
    StorageProfileImageReference ScaleSetStorageProfileImageReference
    A storage_profile_image_reference block as documented below.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Zones List<string>

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    NetworkProfiles []ScaleSetNetworkProfileArgs
    A collection of network_profile blocks as documented below.
    OsProfile ScaleSetOsProfileArgs
    A os_profile block as documented below.
    ResourceGroupName string
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    Sku ScaleSetSkuArgs
    A sku block as documented below.
    StorageProfileOsDisk ScaleSetStorageProfileOsDiskArgs
    A storage_profile_os_disk block as documented below.
    UpgradePolicyMode string
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    AutomaticOsUpgrade bool
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    BootDiagnostics ScaleSetBootDiagnosticsArgs
    A boot_diagnostics block as referenced below.
    EvictionPolicy string

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    Extensions []ScaleSetExtensionArgs
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    HealthProbeId string
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    Identity ScaleSetIdentityArgs
    An identity block as defined below.
    LicenseType string
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    OsProfileLinuxConfig ScaleSetOsProfileLinuxConfigArgs
    A os_profile_linux_config block as documented below.
    OsProfileSecrets []ScaleSetOsProfileSecretArgs
    A collection of os_profile_secrets blocks as documented below.
    OsProfileWindowsConfig ScaleSetOsProfileWindowsConfigArgs
    A os_profile_windows_config block as documented below.
    Overprovision bool
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    Plan ScaleSetPlanArgs
    A plan block as documented below.
    Priority string
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    ProximityPlacementGroupId string
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    RollingUpgradePolicy ScaleSetRollingUpgradePolicyArgs
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    SinglePlacementGroup bool
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    StorageProfileDataDisks []ScaleSetStorageProfileDataDiskArgs
    A storage_profile_data_disk block as documented below.
    StorageProfileImageReference ScaleSetStorageProfileImageReferenceArgs
    A storage_profile_image_reference block as documented below.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    Zones []string

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    networkProfiles List<ScaleSetNetworkProfile>
    A collection of network_profile blocks as documented below.
    osProfile ScaleSetOsProfile
    A os_profile block as documented below.
    resourceGroupName String
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    sku ScaleSetSku
    A sku block as documented below.
    storageProfileOsDisk ScaleSetStorageProfileOsDisk
    A storage_profile_os_disk block as documented below.
    upgradePolicyMode String
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    automaticOsUpgrade Boolean
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    bootDiagnostics ScaleSetBootDiagnostics
    A boot_diagnostics block as referenced below.
    evictionPolicy String

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    extensions List<ScaleSetExtension>
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    healthProbeId String
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    identity ScaleSetIdentity
    An identity block as defined below.
    licenseType String
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    osProfileLinuxConfig ScaleSetOsProfileLinuxConfig
    A os_profile_linux_config block as documented below.
    osProfileSecrets List<ScaleSetOsProfileSecret>
    A collection of os_profile_secrets blocks as documented below.
    osProfileWindowsConfig ScaleSetOsProfileWindowsConfig
    A os_profile_windows_config block as documented below.
    overprovision Boolean
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    plan ScaleSetPlan
    A plan block as documented below.
    priority String
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    proximityPlacementGroupId String
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    rollingUpgradePolicy ScaleSetRollingUpgradePolicy
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    singlePlacementGroup Boolean
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    storageProfileDataDisks List<ScaleSetStorageProfileDataDisk>
    A storage_profile_data_disk block as documented below.
    storageProfileImageReference ScaleSetStorageProfileImageReference
    A storage_profile_image_reference block as documented below.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    zones List<String>

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    networkProfiles ScaleSetNetworkProfile[]
    A collection of network_profile blocks as documented below.
    osProfile ScaleSetOsProfile
    A os_profile block as documented below.
    resourceGroupName string
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    sku ScaleSetSku
    A sku block as documented below.
    storageProfileOsDisk ScaleSetStorageProfileOsDisk
    A storage_profile_os_disk block as documented below.
    upgradePolicyMode string
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    automaticOsUpgrade boolean
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    bootDiagnostics ScaleSetBootDiagnostics
    A boot_diagnostics block as referenced below.
    evictionPolicy string

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    extensions ScaleSetExtension[]
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    healthProbeId string
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    identity ScaleSetIdentity
    An identity block as defined below.
    licenseType string
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    osProfileLinuxConfig ScaleSetOsProfileLinuxConfig
    A os_profile_linux_config block as documented below.
    osProfileSecrets ScaleSetOsProfileSecret[]
    A collection of os_profile_secrets blocks as documented below.
    osProfileWindowsConfig ScaleSetOsProfileWindowsConfig
    A os_profile_windows_config block as documented below.
    overprovision boolean
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    plan ScaleSetPlan
    A plan block as documented below.
    priority string
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    proximityPlacementGroupId string
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    rollingUpgradePolicy ScaleSetRollingUpgradePolicy
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    singlePlacementGroup boolean
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    storageProfileDataDisks ScaleSetStorageProfileDataDisk[]
    A storage_profile_data_disk block as documented below.
    storageProfileImageReference ScaleSetStorageProfileImageReference
    A storage_profile_image_reference block as documented below.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    zones string[]

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    network_profiles Sequence[ScaleSetNetworkProfileArgs]
    A collection of network_profile blocks as documented below.
    os_profile ScaleSetOsProfileArgs
    A os_profile block as documented below.
    resource_group_name str
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    sku ScaleSetSkuArgs
    A sku block as documented below.
    storage_profile_os_disk ScaleSetStorageProfileOsDiskArgs
    A storage_profile_os_disk block as documented below.
    upgrade_policy_mode str
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    automatic_os_upgrade bool
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    boot_diagnostics ScaleSetBootDiagnosticsArgs
    A boot_diagnostics block as referenced below.
    eviction_policy str

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    extensions Sequence[ScaleSetExtensionArgs]
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    health_probe_id str
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    identity ScaleSetIdentityArgs
    An identity block as defined below.
    license_type str
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    os_profile_linux_config ScaleSetOsProfileLinuxConfigArgs
    A os_profile_linux_config block as documented below.
    os_profile_secrets Sequence[ScaleSetOsProfileSecretArgs]
    A collection of os_profile_secrets blocks as documented below.
    os_profile_windows_config ScaleSetOsProfileWindowsConfigArgs
    A os_profile_windows_config block as documented below.
    overprovision bool
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    plan ScaleSetPlanArgs
    A plan block as documented below.
    priority str
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    proximity_placement_group_id str
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    rolling_upgrade_policy ScaleSetRollingUpgradePolicyArgs
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    single_placement_group bool
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    storage_profile_data_disks Sequence[ScaleSetStorageProfileDataDiskArgs]
    A storage_profile_data_disk block as documented below.
    storage_profile_image_reference ScaleSetStorageProfileImageReferenceArgs
    A storage_profile_image_reference block as documented below.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    zones Sequence[str]

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    networkProfiles List<Property Map>
    A collection of network_profile blocks as documented below.
    osProfile Property Map
    A os_profile block as documented below.
    resourceGroupName String
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    sku Property Map
    A sku block as documented below.
    storageProfileOsDisk Property Map
    A storage_profile_os_disk block as documented below.
    upgradePolicyMode String
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    automaticOsUpgrade Boolean
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    bootDiagnostics Property Map
    A boot_diagnostics block as referenced below.
    evictionPolicy String

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    extensions List<Property Map>
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    healthProbeId String
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    identity Property Map
    An identity block as defined below.
    licenseType String
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    osProfileLinuxConfig Property Map
    A os_profile_linux_config block as documented below.
    osProfileSecrets List<Property Map>
    A collection of os_profile_secrets blocks as documented below.
    osProfileWindowsConfig Property Map
    A os_profile_windows_config block as documented below.
    overprovision Boolean
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    plan Property Map
    A plan block as documented below.
    priority String
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    proximityPlacementGroupId String
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    rollingUpgradePolicy Property Map
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    singlePlacementGroup Boolean
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    storageProfileDataDisks List<Property Map>
    A storage_profile_data_disk block as documented below.
    storageProfileImageReference Property Map
    A storage_profile_image_reference block as documented below.
    tags Map<String>
    A mapping of tags to assign to the resource.
    zones List<String>

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ScaleSet resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ScaleSet Resource

    Get an existing ScaleSet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ScaleSetState, opts?: CustomResourceOptions): ScaleSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            automatic_os_upgrade: Optional[bool] = None,
            boot_diagnostics: Optional[ScaleSetBootDiagnosticsArgs] = None,
            eviction_policy: Optional[str] = None,
            extensions: Optional[Sequence[ScaleSetExtensionArgs]] = None,
            health_probe_id: Optional[str] = None,
            identity: Optional[ScaleSetIdentityArgs] = None,
            license_type: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            network_profiles: Optional[Sequence[ScaleSetNetworkProfileArgs]] = None,
            os_profile: Optional[ScaleSetOsProfileArgs] = None,
            os_profile_linux_config: Optional[ScaleSetOsProfileLinuxConfigArgs] = None,
            os_profile_secrets: Optional[Sequence[ScaleSetOsProfileSecretArgs]] = None,
            os_profile_windows_config: Optional[ScaleSetOsProfileWindowsConfigArgs] = None,
            overprovision: Optional[bool] = None,
            plan: Optional[ScaleSetPlanArgs] = None,
            priority: Optional[str] = None,
            proximity_placement_group_id: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            rolling_upgrade_policy: Optional[ScaleSetRollingUpgradePolicyArgs] = None,
            single_placement_group: Optional[bool] = None,
            sku: Optional[ScaleSetSkuArgs] = None,
            storage_profile_data_disks: Optional[Sequence[ScaleSetStorageProfileDataDiskArgs]] = None,
            storage_profile_image_reference: Optional[ScaleSetStorageProfileImageReferenceArgs] = None,
            storage_profile_os_disk: Optional[ScaleSetStorageProfileOsDiskArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            upgrade_policy_mode: Optional[str] = None,
            zones: Optional[Sequence[str]] = None) -> ScaleSet
    func GetScaleSet(ctx *Context, name string, id IDInput, state *ScaleSetState, opts ...ResourceOption) (*ScaleSet, error)
    public static ScaleSet Get(string name, Input<string> id, ScaleSetState? state, CustomResourceOptions? opts = null)
    public static ScaleSet get(String name, Output<String> id, ScaleSetState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutomaticOsUpgrade bool
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    BootDiagnostics ScaleSetBootDiagnostics
    A boot_diagnostics block as referenced below.
    EvictionPolicy string

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    Extensions List<ScaleSetExtension>
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    HealthProbeId string
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    Identity ScaleSetIdentity
    An identity block as defined below.
    LicenseType string
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    NetworkProfiles List<ScaleSetNetworkProfile>
    A collection of network_profile blocks as documented below.
    OsProfile ScaleSetOsProfile
    A os_profile block as documented below.
    OsProfileLinuxConfig ScaleSetOsProfileLinuxConfig
    A os_profile_linux_config block as documented below.
    OsProfileSecrets List<ScaleSetOsProfileSecret>
    A collection of os_profile_secrets blocks as documented below.
    OsProfileWindowsConfig ScaleSetOsProfileWindowsConfig
    A os_profile_windows_config block as documented below.
    Overprovision bool
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    Plan ScaleSetPlan
    A plan block as documented below.
    Priority string
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    ProximityPlacementGroupId string
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    ResourceGroupName string
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    RollingUpgradePolicy ScaleSetRollingUpgradePolicy
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    SinglePlacementGroup bool
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    Sku ScaleSetSku
    A sku block as documented below.
    StorageProfileDataDisks List<ScaleSetStorageProfileDataDisk>
    A storage_profile_data_disk block as documented below.
    StorageProfileImageReference ScaleSetStorageProfileImageReference
    A storage_profile_image_reference block as documented below.
    StorageProfileOsDisk ScaleSetStorageProfileOsDisk
    A storage_profile_os_disk block as documented below.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    UpgradePolicyMode string
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    Zones List<string>

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    AutomaticOsUpgrade bool
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    BootDiagnostics ScaleSetBootDiagnosticsArgs
    A boot_diagnostics block as referenced below.
    EvictionPolicy string

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    Extensions []ScaleSetExtensionArgs
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    HealthProbeId string
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    Identity ScaleSetIdentityArgs
    An identity block as defined below.
    LicenseType string
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    NetworkProfiles []ScaleSetNetworkProfileArgs
    A collection of network_profile blocks as documented below.
    OsProfile ScaleSetOsProfileArgs
    A os_profile block as documented below.
    OsProfileLinuxConfig ScaleSetOsProfileLinuxConfigArgs
    A os_profile_linux_config block as documented below.
    OsProfileSecrets []ScaleSetOsProfileSecretArgs
    A collection of os_profile_secrets blocks as documented below.
    OsProfileWindowsConfig ScaleSetOsProfileWindowsConfigArgs
    A os_profile_windows_config block as documented below.
    Overprovision bool
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    Plan ScaleSetPlanArgs
    A plan block as documented below.
    Priority string
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    ProximityPlacementGroupId string
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    ResourceGroupName string
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    RollingUpgradePolicy ScaleSetRollingUpgradePolicyArgs
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    SinglePlacementGroup bool
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    Sku ScaleSetSkuArgs
    A sku block as documented below.
    StorageProfileDataDisks []ScaleSetStorageProfileDataDiskArgs
    A storage_profile_data_disk block as documented below.
    StorageProfileImageReference ScaleSetStorageProfileImageReferenceArgs
    A storage_profile_image_reference block as documented below.
    StorageProfileOsDisk ScaleSetStorageProfileOsDiskArgs
    A storage_profile_os_disk block as documented below.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    UpgradePolicyMode string
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    Zones []string

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    automaticOsUpgrade Boolean
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    bootDiagnostics ScaleSetBootDiagnostics
    A boot_diagnostics block as referenced below.
    evictionPolicy String

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    extensions List<ScaleSetExtension>
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    healthProbeId String
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    identity ScaleSetIdentity
    An identity block as defined below.
    licenseType String
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    networkProfiles List<ScaleSetNetworkProfile>
    A collection of network_profile blocks as documented below.
    osProfile ScaleSetOsProfile
    A os_profile block as documented below.
    osProfileLinuxConfig ScaleSetOsProfileLinuxConfig
    A os_profile_linux_config block as documented below.
    osProfileSecrets List<ScaleSetOsProfileSecret>
    A collection of os_profile_secrets blocks as documented below.
    osProfileWindowsConfig ScaleSetOsProfileWindowsConfig
    A os_profile_windows_config block as documented below.
    overprovision Boolean
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    plan ScaleSetPlan
    A plan block as documented below.
    priority String
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    proximityPlacementGroupId String
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    resourceGroupName String
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    rollingUpgradePolicy ScaleSetRollingUpgradePolicy
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    singlePlacementGroup Boolean
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    sku ScaleSetSku
    A sku block as documented below.
    storageProfileDataDisks List<ScaleSetStorageProfileDataDisk>
    A storage_profile_data_disk block as documented below.
    storageProfileImageReference ScaleSetStorageProfileImageReference
    A storage_profile_image_reference block as documented below.
    storageProfileOsDisk ScaleSetStorageProfileOsDisk
    A storage_profile_os_disk block as documented below.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    upgradePolicyMode String
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    zones List<String>

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    automaticOsUpgrade boolean
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    bootDiagnostics ScaleSetBootDiagnostics
    A boot_diagnostics block as referenced below.
    evictionPolicy string

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    extensions ScaleSetExtension[]
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    healthProbeId string
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    identity ScaleSetIdentity
    An identity block as defined below.
    licenseType string
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    networkProfiles ScaleSetNetworkProfile[]
    A collection of network_profile blocks as documented below.
    osProfile ScaleSetOsProfile
    A os_profile block as documented below.
    osProfileLinuxConfig ScaleSetOsProfileLinuxConfig
    A os_profile_linux_config block as documented below.
    osProfileSecrets ScaleSetOsProfileSecret[]
    A collection of os_profile_secrets blocks as documented below.
    osProfileWindowsConfig ScaleSetOsProfileWindowsConfig
    A os_profile_windows_config block as documented below.
    overprovision boolean
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    plan ScaleSetPlan
    A plan block as documented below.
    priority string
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    proximityPlacementGroupId string
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    resourceGroupName string
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    rollingUpgradePolicy ScaleSetRollingUpgradePolicy
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    singlePlacementGroup boolean
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    sku ScaleSetSku
    A sku block as documented below.
    storageProfileDataDisks ScaleSetStorageProfileDataDisk[]
    A storage_profile_data_disk block as documented below.
    storageProfileImageReference ScaleSetStorageProfileImageReference
    A storage_profile_image_reference block as documented below.
    storageProfileOsDisk ScaleSetStorageProfileOsDisk
    A storage_profile_os_disk block as documented below.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    upgradePolicyMode string
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    zones string[]

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    automatic_os_upgrade bool
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    boot_diagnostics ScaleSetBootDiagnosticsArgs
    A boot_diagnostics block as referenced below.
    eviction_policy str

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    extensions Sequence[ScaleSetExtensionArgs]
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    health_probe_id str
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    identity ScaleSetIdentityArgs
    An identity block as defined below.
    license_type str
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    network_profiles Sequence[ScaleSetNetworkProfileArgs]
    A collection of network_profile blocks as documented below.
    os_profile ScaleSetOsProfileArgs
    A os_profile block as documented below.
    os_profile_linux_config ScaleSetOsProfileLinuxConfigArgs
    A os_profile_linux_config block as documented below.
    os_profile_secrets Sequence[ScaleSetOsProfileSecretArgs]
    A collection of os_profile_secrets blocks as documented below.
    os_profile_windows_config ScaleSetOsProfileWindowsConfigArgs
    A os_profile_windows_config block as documented below.
    overprovision bool
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    plan ScaleSetPlanArgs
    A plan block as documented below.
    priority str
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    proximity_placement_group_id str
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    resource_group_name str
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    rolling_upgrade_policy ScaleSetRollingUpgradePolicyArgs
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    single_placement_group bool
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    sku ScaleSetSkuArgs
    A sku block as documented below.
    storage_profile_data_disks Sequence[ScaleSetStorageProfileDataDiskArgs]
    A storage_profile_data_disk block as documented below.
    storage_profile_image_reference ScaleSetStorageProfileImageReferenceArgs
    A storage_profile_image_reference block as documented below.
    storage_profile_os_disk ScaleSetStorageProfileOsDiskArgs
    A storage_profile_os_disk block as documented below.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    upgrade_policy_mode str
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    zones Sequence[str]

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    automaticOsUpgrade Boolean
    Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when upgrade_policy_mode is set to Rolling. Defaults to false.
    bootDiagnostics Property Map
    A boot_diagnostics block as referenced below.
    evictionPolicy String

    Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are Deallocate and Delete. Changing this forces a new resource to be created.

    NOTE: eviction_policy can only be set when priority is set to Low.

    extensions List<Property Map>
    Can be specified multiple times to add extension profiles to the scale set. Each extension block supports the fields documented below.
    healthProbeId String
    Specifies the identifier for the load balancer health probe. Required when using Rolling as your upgrade_policy_mode.
    identity Property Map
    An identity block as defined below.
    licenseType String
    (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are Windows_Client and Windows_Server.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.
    networkProfiles List<Property Map>
    A collection of network_profile blocks as documented below.
    osProfile Property Map
    A os_profile block as documented below.
    osProfileLinuxConfig Property Map
    A os_profile_linux_config block as documented below.
    osProfileSecrets List<Property Map>
    A collection of os_profile_secrets blocks as documented below.
    osProfileWindowsConfig Property Map
    A os_profile_windows_config block as documented below.
    overprovision Boolean
    Specifies whether the virtual machine scale set should be overprovisioned. Defaults to true.
    plan Property Map
    A plan block as documented below.
    priority String
    Specifies the priority for the Virtual Machines in the Scale Set. Possible values are Low and Regular. Changing this forces a new resource to be created.
    proximityPlacementGroupId String
    The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
    resourceGroupName String
    The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.
    rollingUpgradePolicy Property Map
    A rolling_upgrade_policy block as defined below. This is only applicable when the upgrade_policy_mode is Rolling.
    singlePlacementGroup Boolean
    Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See documentation for more information. Defaults to true.
    sku Property Map
    A sku block as documented below.
    storageProfileDataDisks List<Property Map>
    A storage_profile_data_disk block as documented below.
    storageProfileImageReference Property Map
    A storage_profile_image_reference block as documented below.
    storageProfileOsDisk Property Map
    A storage_profile_os_disk block as documented below.
    tags Map<String>
    A mapping of tags to assign to the resource.
    upgradePolicyMode String
    Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, Rolling, Manual, or Automatic. When choosing Rolling, you will need to set a health probe.
    zones List<String>

    A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created.

    NOTE: Availability Zones are only supported in several regions at this time.

    Supporting Types

    ScaleSetBootDiagnostics, ScaleSetBootDiagnosticsArgs

    StorageUri string
    Blob endpoint for the storage account to hold the virtual machine's diagnostic files. This must be the root of a storage account, and not a storage container.
    Enabled bool
    Whether to enable boot diagnostics for the virtual machine. Defaults to true.
    StorageUri string
    Blob endpoint for the storage account to hold the virtual machine's diagnostic files. This must be the root of a storage account, and not a storage container.
    Enabled bool
    Whether to enable boot diagnostics for the virtual machine. Defaults to true.
    storageUri String
    Blob endpoint for the storage account to hold the virtual machine's diagnostic files. This must be the root of a storage account, and not a storage container.
    enabled Boolean
    Whether to enable boot diagnostics for the virtual machine. Defaults to true.
    storageUri string
    Blob endpoint for the storage account to hold the virtual machine's diagnostic files. This must be the root of a storage account, and not a storage container.
    enabled boolean
    Whether to enable boot diagnostics for the virtual machine. Defaults to true.
    storage_uri str
    Blob endpoint for the storage account to hold the virtual machine's diagnostic files. This must be the root of a storage account, and not a storage container.
    enabled bool
    Whether to enable boot diagnostics for the virtual machine. Defaults to true.
    storageUri String
    Blob endpoint for the storage account to hold the virtual machine's diagnostic files. This must be the root of a storage account, and not a storage container.
    enabled Boolean
    Whether to enable boot diagnostics for the virtual machine. Defaults to true.

    ScaleSetExtension, ScaleSetExtensionArgs

    Name string
    Specifies the name of the extension.
    Publisher string
    The publisher of the extension, available publishers can be found by using the Azure CLI.
    Type string
    The type of extension, available types for a publisher can be found using the Azure CLI.
    TypeHandlerVersion string
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    AutoUpgradeMinorVersion bool
    Specifies whether or not to use the latest minor version available.
    ProtectedSettings string
    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.
    ProvisionAfterExtensions List<string>
    Specifies a dependency array of extensions required to be executed before, the array stores the name of each extension.
    Settings string
    The settings passed to the extension, these are specified as a JSON object in a string.
    Name string
    Specifies the name of the extension.
    Publisher string
    The publisher of the extension, available publishers can be found by using the Azure CLI.
    Type string
    The type of extension, available types for a publisher can be found using the Azure CLI.
    TypeHandlerVersion string
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    AutoUpgradeMinorVersion bool
    Specifies whether or not to use the latest minor version available.
    ProtectedSettings string
    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.
    ProvisionAfterExtensions []string
    Specifies a dependency array of extensions required to be executed before, the array stores the name of each extension.
    Settings string
    The settings passed to the extension, these are specified as a JSON object in a string.
    name String
    Specifies the name of the extension.
    publisher String
    The publisher of the extension, available publishers can be found by using the Azure CLI.
    type String
    The type of extension, available types for a publisher can be found using the Azure CLI.
    typeHandlerVersion String
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    autoUpgradeMinorVersion Boolean
    Specifies whether or not to use the latest minor version available.
    protectedSettings String
    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.
    provisionAfterExtensions List<String>
    Specifies a dependency array of extensions required to be executed before, the array stores the name of each extension.
    settings String
    The settings passed to the extension, these are specified as a JSON object in a string.
    name string
    Specifies the name of the extension.
    publisher string
    The publisher of the extension, available publishers can be found by using the Azure CLI.
    type string
    The type of extension, available types for a publisher can be found using the Azure CLI.
    typeHandlerVersion string
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    autoUpgradeMinorVersion boolean
    Specifies whether or not to use the latest minor version available.
    protectedSettings string
    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.
    provisionAfterExtensions string[]
    Specifies a dependency array of extensions required to be executed before, the array stores the name of each extension.
    settings string
    The settings passed to the extension, these are specified as a JSON object in a string.
    name str
    Specifies the name of the extension.
    publisher str
    The publisher of the extension, available publishers can be found by using the Azure CLI.
    type str
    The type of extension, available types for a publisher can be found using the Azure CLI.
    type_handler_version str
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    auto_upgrade_minor_version bool
    Specifies whether or not to use the latest minor version available.
    protected_settings str
    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.
    provision_after_extensions Sequence[str]
    Specifies a dependency array of extensions required to be executed before, the array stores the name of each extension.
    settings str
    The settings passed to the extension, these are specified as a JSON object in a string.
    name String
    Specifies the name of the extension.
    publisher String
    The publisher of the extension, available publishers can be found by using the Azure CLI.
    type String
    The type of extension, available types for a publisher can be found using the Azure CLI.
    typeHandlerVersion String
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    autoUpgradeMinorVersion Boolean
    Specifies whether or not to use the latest minor version available.
    protectedSettings String
    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.
    provisionAfterExtensions List<String>
    Specifies a dependency array of extensions required to be executed before, the array stores the name of each extension.
    settings String
    The settings passed to the extension, these are specified as a JSON object in a string.

    ScaleSetIdentity, ScaleSetIdentityArgs

    Type string
    Specifies the identity type to be assigned to the scale set. Allowable values are SystemAssigned and UserAssigned. For the SystemAssigned identity the scale set's Service Principal ID (SPN) can be retrieved after the scale set has been created. See documentation for more information. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.
    IdentityIds List<string>
    Specifies a list of user managed identity ids to be assigned to the VMSS. Required if type is UserAssigned.

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    

    const example = new azure.compute.ScaleSet("example", { name: "vm-scaleset", resourceGroupName: exampleAzurermResourceGroup.name, location: exampleAzurermResourceGroup.location, sku: { name: vmSku, tier: "Standard", capacity: instanceCount, }, identity: { type: "SystemAssigned", }, extensions: [{ name: "MSILinuxExtension", publisher: "Microsoft.ManagedIdentity", type: "ManagedIdentityExtensionForLinux", typeHandlerVersion: "1.0", settings: "{&quot;port&quot;: 50342}", }], }); export const principalId = example.identity.apply(identity => identity.principalId);

    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.ScaleSet("example",
        name="vm-scaleset",
        resource_group_name=example_azurerm_resource_group["name"],
        location=example_azurerm_resource_group["location"],
        sku=azure.compute.ScaleSetSkuArgs(
            name=vm_sku,
            tier="Standard",
            capacity=instance_count,
        ),
        identity=azure.compute.ScaleSetIdentityArgs(
            type="SystemAssigned",
        ),
        extensions=[azure.compute.ScaleSetExtensionArgs(
            name="MSILinuxExtension",
            publisher="Microsoft.ManagedIdentity",
            type="ManagedIdentityExtensionForLinux",
            type_handler_version="1.0",
            settings="{\"port\": 50342}",
        )])
    pulumi.export("principalId", example.identity.principal_id)
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Compute.ScaleSet("example", new()
        {
            Name = "vm-scaleset",
            ResourceGroupName = exampleAzurermResourceGroup.Name,
            Location = exampleAzurermResourceGroup.Location,
            Sku = new Azure.Compute.Inputs.ScaleSetSkuArgs
            {
                Name = vmSku,
                Tier = "Standard",
                Capacity = instanceCount,
            },
            Identity = new Azure.Compute.Inputs.ScaleSetIdentityArgs
            {
                Type = "SystemAssigned",
            },
            Extensions = new[]
            {
                new Azure.Compute.Inputs.ScaleSetExtensionArgs
                {
                    Name = "MSILinuxExtension",
                    Publisher = "Microsoft.ManagedIdentity",
                    Type = "ManagedIdentityExtensionForLinux",
                    TypeHandlerVersion = "1.0",
                    Settings = "{\"port\": 50342}",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["principalId"] = example.Identity.Apply(identity => identity.PrincipalId),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{
    			Name:              pulumi.String("vm-scaleset"),
    			ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name),
    			Location:          pulumi.Any(exampleAzurermResourceGroup.Location),
    			Sku: &compute.ScaleSetSkuArgs{
    				Name:     pulumi.Any(vmSku),
    				Tier:     pulumi.String("Standard"),
    				Capacity: pulumi.Any(instanceCount),
    			},
    			Identity: &compute.ScaleSetIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    			Extensions: compute.ScaleSetExtensionArray{
    				&compute.ScaleSetExtensionArgs{
    					Name:               pulumi.String("MSILinuxExtension"),
    					Publisher:          pulumi.String("Microsoft.ManagedIdentity"),
    					Type:               pulumi.String("ManagedIdentityExtensionForLinux"),
    					TypeHandlerVersion: pulumi.String("1.0"),
    					Settings:           pulumi.String("{\"port\": 50342}"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("principalId", example.Identity.ApplyT(func(identity compute.ScaleSetIdentity) (*string, error) {
    			return &identity.PrincipalId, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.compute.ScaleSet;
    import com.pulumi.azure.compute.ScaleSetArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetIdentityArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetExtensionArgs;
    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 example = new ScaleSet("example", ScaleSetArgs.builder()        
                .name("vm-scaleset")
                .resourceGroupName(exampleAzurermResourceGroup.name())
                .location(exampleAzurermResourceGroup.location())
                .sku(ScaleSetSkuArgs.builder()
                    .name(vmSku)
                    .tier("Standard")
                    .capacity(instanceCount)
                    .build())
                .identity(ScaleSetIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .extensions(ScaleSetExtensionArgs.builder()
                    .name("MSILinuxExtension")
                    .publisher("Microsoft.ManagedIdentity")
                    .type("ManagedIdentityExtensionForLinux")
                    .typeHandlerVersion("1.0")
                    .settings("{\"port\": 50342}")
                    .build())
                .build());
    
            ctx.export("principalId", example.identity().applyValue(identity -> identity.principalId()));
        }
    }
    
    resources:
      example:
        type: azure:compute:ScaleSet
        properties:
          name: vm-scaleset
          resourceGroupName: ${exampleAzurermResourceGroup.name}
          location: ${exampleAzurermResourceGroup.location}
          sku:
            name: ${vmSku}
            tier: Standard
            capacity: ${instanceCount}
          identity:
            type: SystemAssigned
          extensions:
            - name: MSILinuxExtension
              publisher: Microsoft.ManagedIdentity
              type: ManagedIdentityExtensionForLinux
              typeHandlerVersion: '1.0'
              settings: '{"port": 50342}'
    outputs:
      principalId: ${example.identity.principalId}
    
    title="Optional"> <span id="principalid_csharp">

    PrincipalId string

    Type string
    Specifies the identity type to be assigned to the scale set. Allowable values are SystemAssigned and UserAssigned. For the SystemAssigned identity the scale set's Service Principal ID (SPN) can be retrieved after the scale set has been created. See documentation for more information. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.
    IdentityIds []string
    Specifies a list of user managed identity ids to be assigned to the VMSS. Required if type is UserAssigned.

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    

    const example = new azure.compute.ScaleSet("example", { name: "vm-scaleset", resourceGroupName: exampleAzurermResourceGroup.name, location: exampleAzurermResourceGroup.location, sku: { name: vmSku, tier: "Standard", capacity: instanceCount, }, identity: { type: "SystemAssigned", }, extensions: [{ name: "MSILinuxExtension", publisher: "Microsoft.ManagedIdentity", type: "ManagedIdentityExtensionForLinux", typeHandlerVersion: "1.0", settings: "{&quot;port&quot;: 50342}", }], }); export const principalId = example.identity.apply(identity => identity.principalId);

    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.ScaleSet("example",
        name="vm-scaleset",
        resource_group_name=example_azurerm_resource_group["name"],
        location=example_azurerm_resource_group["location"],
        sku=azure.compute.ScaleSetSkuArgs(
            name=vm_sku,
            tier="Standard",
            capacity=instance_count,
        ),
        identity=azure.compute.ScaleSetIdentityArgs(
            type="SystemAssigned",
        ),
        extensions=[azure.compute.ScaleSetExtensionArgs(
            name="MSILinuxExtension",
            publisher="Microsoft.ManagedIdentity",
            type="ManagedIdentityExtensionForLinux",
            type_handler_version="1.0",
            settings="{\"port\": 50342}",
        )])
    pulumi.export("principalId", example.identity.principal_id)
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Compute.ScaleSet("example", new()
        {
            Name = "vm-scaleset",
            ResourceGroupName = exampleAzurermResourceGroup.Name,
            Location = exampleAzurermResourceGroup.Location,
            Sku = new Azure.Compute.Inputs.ScaleSetSkuArgs
            {
                Name = vmSku,
                Tier = "Standard",
                Capacity = instanceCount,
            },
            Identity = new Azure.Compute.Inputs.ScaleSetIdentityArgs
            {
                Type = "SystemAssigned",
            },
            Extensions = new[]
            {
                new Azure.Compute.Inputs.ScaleSetExtensionArgs
                {
                    Name = "MSILinuxExtension",
                    Publisher = "Microsoft.ManagedIdentity",
                    Type = "ManagedIdentityExtensionForLinux",
                    TypeHandlerVersion = "1.0",
                    Settings = "{\"port\": 50342}",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["principalId"] = example.Identity.Apply(identity => identity.PrincipalId),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{
    			Name:              pulumi.String("vm-scaleset"),
    			ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name),
    			Location:          pulumi.Any(exampleAzurermResourceGroup.Location),
    			Sku: &compute.ScaleSetSkuArgs{
    				Name:     pulumi.Any(vmSku),
    				Tier:     pulumi.String("Standard"),
    				Capacity: pulumi.Any(instanceCount),
    			},
    			Identity: &compute.ScaleSetIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    			Extensions: compute.ScaleSetExtensionArray{
    				&compute.ScaleSetExtensionArgs{
    					Name:               pulumi.String("MSILinuxExtension"),
    					Publisher:          pulumi.String("Microsoft.ManagedIdentity"),
    					Type:               pulumi.String("ManagedIdentityExtensionForLinux"),
    					TypeHandlerVersion: pulumi.String("1.0"),
    					Settings:           pulumi.String("{\"port\": 50342}"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("principalId", example.Identity.ApplyT(func(identity compute.ScaleSetIdentity) (*string, error) {
    			return &identity.PrincipalId, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.compute.ScaleSet;
    import com.pulumi.azure.compute.ScaleSetArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetIdentityArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetExtensionArgs;
    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 example = new ScaleSet("example", ScaleSetArgs.builder()        
                .name("vm-scaleset")
                .resourceGroupName(exampleAzurermResourceGroup.name())
                .location(exampleAzurermResourceGroup.location())
                .sku(ScaleSetSkuArgs.builder()
                    .name(vmSku)
                    .tier("Standard")
                    .capacity(instanceCount)
                    .build())
                .identity(ScaleSetIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .extensions(ScaleSetExtensionArgs.builder()
                    .name("MSILinuxExtension")
                    .publisher("Microsoft.ManagedIdentity")
                    .type("ManagedIdentityExtensionForLinux")
                    .typeHandlerVersion("1.0")
                    .settings("{\"port\": 50342}")
                    .build())
                .build());
    
            ctx.export("principalId", example.identity().applyValue(identity -> identity.principalId()));
        }
    }
    
    resources:
      example:
        type: azure:compute:ScaleSet
        properties:
          name: vm-scaleset
          resourceGroupName: ${exampleAzurermResourceGroup.name}
          location: ${exampleAzurermResourceGroup.location}
          sku:
            name: ${vmSku}
            tier: Standard
            capacity: ${instanceCount}
          identity:
            type: SystemAssigned
          extensions:
            - name: MSILinuxExtension
              publisher: Microsoft.ManagedIdentity
              type: ManagedIdentityExtensionForLinux
              typeHandlerVersion: '1.0'
              settings: '{"port": 50342}'
    outputs:
      principalId: ${example.identity.principalId}
    
    title="Optional"> <span id="principalid_go">

    PrincipalId string

    type String
    Specifies the identity type to be assigned to the scale set. Allowable values are SystemAssigned and UserAssigned. For the SystemAssigned identity the scale set's Service Principal ID (SPN) can be retrieved after the scale set has been created. See documentation for more information. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.
    identityIds List<String>
    Specifies a list of user managed identity ids to be assigned to the VMSS. Required if type is UserAssigned.

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    

    const example = new azure.compute.ScaleSet("example", { name: "vm-scaleset", resourceGroupName: exampleAzurermResourceGroup.name, location: exampleAzurermResourceGroup.location, sku: { name: vmSku, tier: "Standard", capacity: instanceCount, }, identity: { type: "SystemAssigned", }, extensions: [{ name: "MSILinuxExtension", publisher: "Microsoft.ManagedIdentity", type: "ManagedIdentityExtensionForLinux", typeHandlerVersion: "1.0", settings: "{&quot;port&quot;: 50342}", }], }); export const principalId = example.identity.apply(identity => identity.principalId);

    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.ScaleSet("example",
        name="vm-scaleset",
        resource_group_name=example_azurerm_resource_group["name"],
        location=example_azurerm_resource_group["location"],
        sku=azure.compute.ScaleSetSkuArgs(
            name=vm_sku,
            tier="Standard",
            capacity=instance_count,
        ),
        identity=azure.compute.ScaleSetIdentityArgs(
            type="SystemAssigned",
        ),
        extensions=[azure.compute.ScaleSetExtensionArgs(
            name="MSILinuxExtension",
            publisher="Microsoft.ManagedIdentity",
            type="ManagedIdentityExtensionForLinux",
            type_handler_version="1.0",
            settings="{\"port\": 50342}",
        )])
    pulumi.export("principalId", example.identity.principal_id)
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Compute.ScaleSet("example", new()
        {
            Name = "vm-scaleset",
            ResourceGroupName = exampleAzurermResourceGroup.Name,
            Location = exampleAzurermResourceGroup.Location,
            Sku = new Azure.Compute.Inputs.ScaleSetSkuArgs
            {
                Name = vmSku,
                Tier = "Standard",
                Capacity = instanceCount,
            },
            Identity = new Azure.Compute.Inputs.ScaleSetIdentityArgs
            {
                Type = "SystemAssigned",
            },
            Extensions = new[]
            {
                new Azure.Compute.Inputs.ScaleSetExtensionArgs
                {
                    Name = "MSILinuxExtension",
                    Publisher = "Microsoft.ManagedIdentity",
                    Type = "ManagedIdentityExtensionForLinux",
                    TypeHandlerVersion = "1.0",
                    Settings = "{\"port\": 50342}",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["principalId"] = example.Identity.Apply(identity => identity.PrincipalId),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{
    			Name:              pulumi.String("vm-scaleset"),
    			ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name),
    			Location:          pulumi.Any(exampleAzurermResourceGroup.Location),
    			Sku: &compute.ScaleSetSkuArgs{
    				Name:     pulumi.Any(vmSku),
    				Tier:     pulumi.String("Standard"),
    				Capacity: pulumi.Any(instanceCount),
    			},
    			Identity: &compute.ScaleSetIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    			Extensions: compute.ScaleSetExtensionArray{
    				&compute.ScaleSetExtensionArgs{
    					Name:               pulumi.String("MSILinuxExtension"),
    					Publisher:          pulumi.String("Microsoft.ManagedIdentity"),
    					Type:               pulumi.String("ManagedIdentityExtensionForLinux"),
    					TypeHandlerVersion: pulumi.String("1.0"),
    					Settings:           pulumi.String("{\"port\": 50342}"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("principalId", example.Identity.ApplyT(func(identity compute.ScaleSetIdentity) (*string, error) {
    			return &identity.PrincipalId, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.compute.ScaleSet;
    import com.pulumi.azure.compute.ScaleSetArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetIdentityArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetExtensionArgs;
    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 example = new ScaleSet("example", ScaleSetArgs.builder()        
                .name("vm-scaleset")
                .resourceGroupName(exampleAzurermResourceGroup.name())
                .location(exampleAzurermResourceGroup.location())
                .sku(ScaleSetSkuArgs.builder()
                    .name(vmSku)
                    .tier("Standard")
                    .capacity(instanceCount)
                    .build())
                .identity(ScaleSetIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .extensions(ScaleSetExtensionArgs.builder()
                    .name("MSILinuxExtension")
                    .publisher("Microsoft.ManagedIdentity")
                    .type("ManagedIdentityExtensionForLinux")
                    .typeHandlerVersion("1.0")
                    .settings("{\"port\": 50342}")
                    .build())
                .build());
    
            ctx.export("principalId", example.identity().applyValue(identity -> identity.principalId()));
        }
    }
    
    resources:
      example:
        type: azure:compute:ScaleSet
        properties:
          name: vm-scaleset
          resourceGroupName: ${exampleAzurermResourceGroup.name}
          location: ${exampleAzurermResourceGroup.location}
          sku:
            name: ${vmSku}
            tier: Standard
            capacity: ${instanceCount}
          identity:
            type: SystemAssigned
          extensions:
            - name: MSILinuxExtension
              publisher: Microsoft.ManagedIdentity
              type: ManagedIdentityExtensionForLinux
              typeHandlerVersion: '1.0'
              settings: '{"port": 50342}'
    outputs:
      principalId: ${example.identity.principalId}
    
    title="Optional"> <span id="principalid_java">

    principalId String

    type string
    Specifies the identity type to be assigned to the scale set. Allowable values are SystemAssigned and UserAssigned. For the SystemAssigned identity the scale set's Service Principal ID (SPN) can be retrieved after the scale set has been created. See documentation for more information. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.
    identityIds string[]
    Specifies a list of user managed identity ids to be assigned to the VMSS. Required if type is UserAssigned.

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    

    const example = new azure.compute.ScaleSet("example", { name: "vm-scaleset", resourceGroupName: exampleAzurermResourceGroup.name, location: exampleAzurermResourceGroup.location, sku: { name: vmSku, tier: "Standard", capacity: instanceCount, }, identity: { type: "SystemAssigned", }, extensions: [{ name: "MSILinuxExtension", publisher: "Microsoft.ManagedIdentity", type: "ManagedIdentityExtensionForLinux", typeHandlerVersion: "1.0", settings: "{&quot;port&quot;: 50342}", }], }); export const principalId = example.identity.apply(identity => identity.principalId);

    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.ScaleSet("example",
        name="vm-scaleset",
        resource_group_name=example_azurerm_resource_group["name"],
        location=example_azurerm_resource_group["location"],
        sku=azure.compute.ScaleSetSkuArgs(
            name=vm_sku,
            tier="Standard",
            capacity=instance_count,
        ),
        identity=azure.compute.ScaleSetIdentityArgs(
            type="SystemAssigned",
        ),
        extensions=[azure.compute.ScaleSetExtensionArgs(
            name="MSILinuxExtension",
            publisher="Microsoft.ManagedIdentity",
            type="ManagedIdentityExtensionForLinux",
            type_handler_version="1.0",
            settings="{\"port\": 50342}",
        )])
    pulumi.export("principalId", example.identity.principal_id)
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Compute.ScaleSet("example", new()
        {
            Name = "vm-scaleset",
            ResourceGroupName = exampleAzurermResourceGroup.Name,
            Location = exampleAzurermResourceGroup.Location,
            Sku = new Azure.Compute.Inputs.ScaleSetSkuArgs
            {
                Name = vmSku,
                Tier = "Standard",
                Capacity = instanceCount,
            },
            Identity = new Azure.Compute.Inputs.ScaleSetIdentityArgs
            {
                Type = "SystemAssigned",
            },
            Extensions = new[]
            {
                new Azure.Compute.Inputs.ScaleSetExtensionArgs
                {
                    Name = "MSILinuxExtension",
                    Publisher = "Microsoft.ManagedIdentity",
                    Type = "ManagedIdentityExtensionForLinux",
                    TypeHandlerVersion = "1.0",
                    Settings = "{\"port\": 50342}",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["principalId"] = example.Identity.Apply(identity => identity.PrincipalId),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{
    			Name:              pulumi.String("vm-scaleset"),
    			ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name),
    			Location:          pulumi.Any(exampleAzurermResourceGroup.Location),
    			Sku: &compute.ScaleSetSkuArgs{
    				Name:     pulumi.Any(vmSku),
    				Tier:     pulumi.String("Standard"),
    				Capacity: pulumi.Any(instanceCount),
    			},
    			Identity: &compute.ScaleSetIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    			Extensions: compute.ScaleSetExtensionArray{
    				&compute.ScaleSetExtensionArgs{
    					Name:               pulumi.String("MSILinuxExtension"),
    					Publisher:          pulumi.String("Microsoft.ManagedIdentity"),
    					Type:               pulumi.String("ManagedIdentityExtensionForLinux"),
    					TypeHandlerVersion: pulumi.String("1.0"),
    					Settings:           pulumi.String("{\"port\": 50342}"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("principalId", example.Identity.ApplyT(func(identity compute.ScaleSetIdentity) (*string, error) {
    			return &identity.PrincipalId, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.compute.ScaleSet;
    import com.pulumi.azure.compute.ScaleSetArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetIdentityArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetExtensionArgs;
    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 example = new ScaleSet("example", ScaleSetArgs.builder()        
                .name("vm-scaleset")
                .resourceGroupName(exampleAzurermResourceGroup.name())
                .location(exampleAzurermResourceGroup.location())
                .sku(ScaleSetSkuArgs.builder()
                    .name(vmSku)
                    .tier("Standard")
                    .capacity(instanceCount)
                    .build())
                .identity(ScaleSetIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .extensions(ScaleSetExtensionArgs.builder()
                    .name("MSILinuxExtension")
                    .publisher("Microsoft.ManagedIdentity")
                    .type("ManagedIdentityExtensionForLinux")
                    .typeHandlerVersion("1.0")
                    .settings("{\"port\": 50342}")
                    .build())
                .build());
    
            ctx.export("principalId", example.identity().applyValue(identity -> identity.principalId()));
        }
    }
    
    resources:
      example:
        type: azure:compute:ScaleSet
        properties:
          name: vm-scaleset
          resourceGroupName: ${exampleAzurermResourceGroup.name}
          location: ${exampleAzurermResourceGroup.location}
          sku:
            name: ${vmSku}
            tier: Standard
            capacity: ${instanceCount}
          identity:
            type: SystemAssigned
          extensions:
            - name: MSILinuxExtension
              publisher: Microsoft.ManagedIdentity
              type: ManagedIdentityExtensionForLinux
              typeHandlerVersion: '1.0'
              settings: '{"port": 50342}'
    outputs:
      principalId: ${example.identity.principalId}
    
    title="Optional"> <span id="principalid_nodejs">

    principalId string

    type str
    Specifies the identity type to be assigned to the scale set. Allowable values are SystemAssigned and UserAssigned. For the SystemAssigned identity the scale set's Service Principal ID (SPN) can be retrieved after the scale set has been created. See documentation for more information. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.
    identity_ids Sequence[str]
    Specifies a list of user managed identity ids to be assigned to the VMSS. Required if type is UserAssigned.

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    

    const example = new azure.compute.ScaleSet("example", { name: "vm-scaleset", resourceGroupName: exampleAzurermResourceGroup.name, location: exampleAzurermResourceGroup.location, sku: { name: vmSku, tier: "Standard", capacity: instanceCount, }, identity: { type: "SystemAssigned", }, extensions: [{ name: "MSILinuxExtension", publisher: "Microsoft.ManagedIdentity", type: "ManagedIdentityExtensionForLinux", typeHandlerVersion: "1.0", settings: "{&quot;port&quot;: 50342}", }], }); export const principalId = example.identity.apply(identity => identity.principalId);

    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.ScaleSet("example",
        name="vm-scaleset",
        resource_group_name=example_azurerm_resource_group["name"],
        location=example_azurerm_resource_group["location"],
        sku=azure.compute.ScaleSetSkuArgs(
            name=vm_sku,
            tier="Standard",
            capacity=instance_count,
        ),
        identity=azure.compute.ScaleSetIdentityArgs(
            type="SystemAssigned",
        ),
        extensions=[azure.compute.ScaleSetExtensionArgs(
            name="MSILinuxExtension",
            publisher="Microsoft.ManagedIdentity",
            type="ManagedIdentityExtensionForLinux",
            type_handler_version="1.0",
            settings="{\"port\": 50342}",
        )])
    pulumi.export("principalId", example.identity.principal_id)
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Compute.ScaleSet("example", new()
        {
            Name = "vm-scaleset",
            ResourceGroupName = exampleAzurermResourceGroup.Name,
            Location = exampleAzurermResourceGroup.Location,
            Sku = new Azure.Compute.Inputs.ScaleSetSkuArgs
            {
                Name = vmSku,
                Tier = "Standard",
                Capacity = instanceCount,
            },
            Identity = new Azure.Compute.Inputs.ScaleSetIdentityArgs
            {
                Type = "SystemAssigned",
            },
            Extensions = new[]
            {
                new Azure.Compute.Inputs.ScaleSetExtensionArgs
                {
                    Name = "MSILinuxExtension",
                    Publisher = "Microsoft.ManagedIdentity",
                    Type = "ManagedIdentityExtensionForLinux",
                    TypeHandlerVersion = "1.0",
                    Settings = "{\"port\": 50342}",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["principalId"] = example.Identity.Apply(identity => identity.PrincipalId),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{
    			Name:              pulumi.String("vm-scaleset"),
    			ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name),
    			Location:          pulumi.Any(exampleAzurermResourceGroup.Location),
    			Sku: &compute.ScaleSetSkuArgs{
    				Name:     pulumi.Any(vmSku),
    				Tier:     pulumi.String("Standard"),
    				Capacity: pulumi.Any(instanceCount),
    			},
    			Identity: &compute.ScaleSetIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    			Extensions: compute.ScaleSetExtensionArray{
    				&compute.ScaleSetExtensionArgs{
    					Name:               pulumi.String("MSILinuxExtension"),
    					Publisher:          pulumi.String("Microsoft.ManagedIdentity"),
    					Type:               pulumi.String("ManagedIdentityExtensionForLinux"),
    					TypeHandlerVersion: pulumi.String("1.0"),
    					Settings:           pulumi.String("{\"port\": 50342}"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("principalId", example.Identity.ApplyT(func(identity compute.ScaleSetIdentity) (*string, error) {
    			return &identity.PrincipalId, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.compute.ScaleSet;
    import com.pulumi.azure.compute.ScaleSetArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetIdentityArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetExtensionArgs;
    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 example = new ScaleSet("example", ScaleSetArgs.builder()        
                .name("vm-scaleset")
                .resourceGroupName(exampleAzurermResourceGroup.name())
                .location(exampleAzurermResourceGroup.location())
                .sku(ScaleSetSkuArgs.builder()
                    .name(vmSku)
                    .tier("Standard")
                    .capacity(instanceCount)
                    .build())
                .identity(ScaleSetIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .extensions(ScaleSetExtensionArgs.builder()
                    .name("MSILinuxExtension")
                    .publisher("Microsoft.ManagedIdentity")
                    .type("ManagedIdentityExtensionForLinux")
                    .typeHandlerVersion("1.0")
                    .settings("{\"port\": 50342}")
                    .build())
                .build());
    
            ctx.export("principalId", example.identity().applyValue(identity -> identity.principalId()));
        }
    }
    
    resources:
      example:
        type: azure:compute:ScaleSet
        properties:
          name: vm-scaleset
          resourceGroupName: ${exampleAzurermResourceGroup.name}
          location: ${exampleAzurermResourceGroup.location}
          sku:
            name: ${vmSku}
            tier: Standard
            capacity: ${instanceCount}
          identity:
            type: SystemAssigned
          extensions:
            - name: MSILinuxExtension
              publisher: Microsoft.ManagedIdentity
              type: ManagedIdentityExtensionForLinux
              typeHandlerVersion: '1.0'
              settings: '{"port": 50342}'
    outputs:
      principalId: ${example.identity.principalId}
    
    title="Optional"> <span id="principal_id_python">

    principal_id str

    type String
    Specifies the identity type to be assigned to the scale set. Allowable values are SystemAssigned and UserAssigned. For the SystemAssigned identity the scale set's Service Principal ID (SPN) can be retrieved after the scale set has been created. See documentation for more information. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.
    identityIds List<String>
    Specifies a list of user managed identity ids to be assigned to the VMSS. Required if type is UserAssigned.

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    

    const example = new azure.compute.ScaleSet("example", { name: "vm-scaleset", resourceGroupName: exampleAzurermResourceGroup.name, location: exampleAzurermResourceGroup.location, sku: { name: vmSku, tier: "Standard", capacity: instanceCount, }, identity: { type: "SystemAssigned", }, extensions: [{ name: "MSILinuxExtension", publisher: "Microsoft.ManagedIdentity", type: "ManagedIdentityExtensionForLinux", typeHandlerVersion: "1.0", settings: "{&quot;port&quot;: 50342}", }], }); export const principalId = example.identity.apply(identity => identity.principalId);

    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.ScaleSet("example",
        name="vm-scaleset",
        resource_group_name=example_azurerm_resource_group["name"],
        location=example_azurerm_resource_group["location"],
        sku=azure.compute.ScaleSetSkuArgs(
            name=vm_sku,
            tier="Standard",
            capacity=instance_count,
        ),
        identity=azure.compute.ScaleSetIdentityArgs(
            type="SystemAssigned",
        ),
        extensions=[azure.compute.ScaleSetExtensionArgs(
            name="MSILinuxExtension",
            publisher="Microsoft.ManagedIdentity",
            type="ManagedIdentityExtensionForLinux",
            type_handler_version="1.0",
            settings="{\"port\": 50342}",
        )])
    pulumi.export("principalId", example.identity.principal_id)
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Compute.ScaleSet("example", new()
        {
            Name = "vm-scaleset",
            ResourceGroupName = exampleAzurermResourceGroup.Name,
            Location = exampleAzurermResourceGroup.Location,
            Sku = new Azure.Compute.Inputs.ScaleSetSkuArgs
            {
                Name = vmSku,
                Tier = "Standard",
                Capacity = instanceCount,
            },
            Identity = new Azure.Compute.Inputs.ScaleSetIdentityArgs
            {
                Type = "SystemAssigned",
            },
            Extensions = new[]
            {
                new Azure.Compute.Inputs.ScaleSetExtensionArgs
                {
                    Name = "MSILinuxExtension",
                    Publisher = "Microsoft.ManagedIdentity",
                    Type = "ManagedIdentityExtensionForLinux",
                    TypeHandlerVersion = "1.0",
                    Settings = "{\"port\": 50342}",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["principalId"] = example.Identity.Apply(identity => identity.PrincipalId),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{
    			Name:              pulumi.String("vm-scaleset"),
    			ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name),
    			Location:          pulumi.Any(exampleAzurermResourceGroup.Location),
    			Sku: &compute.ScaleSetSkuArgs{
    				Name:     pulumi.Any(vmSku),
    				Tier:     pulumi.String("Standard"),
    				Capacity: pulumi.Any(instanceCount),
    			},
    			Identity: &compute.ScaleSetIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    			Extensions: compute.ScaleSetExtensionArray{
    				&compute.ScaleSetExtensionArgs{
    					Name:               pulumi.String("MSILinuxExtension"),
    					Publisher:          pulumi.String("Microsoft.ManagedIdentity"),
    					Type:               pulumi.String("ManagedIdentityExtensionForLinux"),
    					TypeHandlerVersion: pulumi.String("1.0"),
    					Settings:           pulumi.String("{\"port\": 50342}"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("principalId", example.Identity.ApplyT(func(identity compute.ScaleSetIdentity) (*string, error) {
    			return &identity.PrincipalId, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.compute.ScaleSet;
    import com.pulumi.azure.compute.ScaleSetArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetIdentityArgs;
    import com.pulumi.azure.compute.inputs.ScaleSetExtensionArgs;
    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 example = new ScaleSet("example", ScaleSetArgs.builder()        
                .name("vm-scaleset")
                .resourceGroupName(exampleAzurermResourceGroup.name())
                .location(exampleAzurermResourceGroup.location())
                .sku(ScaleSetSkuArgs.builder()
                    .name(vmSku)
                    .tier("Standard")
                    .capacity(instanceCount)
                    .build())
                .identity(ScaleSetIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .extensions(ScaleSetExtensionArgs.builder()
                    .name("MSILinuxExtension")
                    .publisher("Microsoft.ManagedIdentity")
                    .type("ManagedIdentityExtensionForLinux")
                    .typeHandlerVersion("1.0")
                    .settings("{\"port\": 50342}")
                    .build())
                .build());
    
            ctx.export("principalId", example.identity().applyValue(identity -> identity.principalId()));
        }
    }
    
    resources:
      example:
        type: azure:compute:ScaleSet
        properties:
          name: vm-scaleset
          resourceGroupName: ${exampleAzurermResourceGroup.name}
          location: ${exampleAzurermResourceGroup.location}
          sku:
            name: ${vmSku}
            tier: Standard
            capacity: ${instanceCount}
          identity:
            type: SystemAssigned
          extensions:
            - name: MSILinuxExtension
              publisher: Microsoft.ManagedIdentity
              type: ManagedIdentityExtensionForLinux
              typeHandlerVersion: '1.0'
              settings: '{"port": 50342}'
    outputs:
      principalId: ${example.identity.principalId}
    
    title="Optional"> <span id="principalid_yaml">

    principalId String

    ScaleSetNetworkProfile, ScaleSetNetworkProfileArgs

    IpConfigurations List<ScaleSetNetworkProfileIpConfiguration>
    An ip_configuration block as documented below.
    Name string
    Specifies the name of the network interface configuration.
    Primary bool
    Indicates whether network interfaces created from the network interface configuration will be the primary NIC of the VM.
    AcceleratedNetworking bool
    Specifies whether to enable accelerated networking or not.
    DnsSettings ScaleSetNetworkProfileDnsSettings
    A dns_settings block as documented below.
    IpForwarding bool
    Whether IP forwarding is enabled on this NIC. Defaults to false.
    NetworkSecurityGroupId string
    Specifies the identifier for the network security group.
    IpConfigurations []ScaleSetNetworkProfileIpConfiguration
    An ip_configuration block as documented below.
    Name string
    Specifies the name of the network interface configuration.
    Primary bool
    Indicates whether network interfaces created from the network interface configuration will be the primary NIC of the VM.
    AcceleratedNetworking bool
    Specifies whether to enable accelerated networking or not.
    DnsSettings ScaleSetNetworkProfileDnsSettings
    A dns_settings block as documented below.
    IpForwarding bool
    Whether IP forwarding is enabled on this NIC. Defaults to false.
    NetworkSecurityGroupId string
    Specifies the identifier for the network security group.
    ipConfigurations List<ScaleSetNetworkProfileIpConfiguration>
    An ip_configuration block as documented below.
    name String
    Specifies the name of the network interface configuration.
    primary Boolean
    Indicates whether network interfaces created from the network interface configuration will be the primary NIC of the VM.
    acceleratedNetworking Boolean
    Specifies whether to enable accelerated networking or not.
    dnsSettings ScaleSetNetworkProfileDnsSettings
    A dns_settings block as documented below.
    ipForwarding Boolean
    Whether IP forwarding is enabled on this NIC. Defaults to false.
    networkSecurityGroupId String
    Specifies the identifier for the network security group.
    ipConfigurations ScaleSetNetworkProfileIpConfiguration[]
    An ip_configuration block as documented below.
    name string
    Specifies the name of the network interface configuration.
    primary boolean
    Indicates whether network interfaces created from the network interface configuration will be the primary NIC of the VM.
    acceleratedNetworking boolean
    Specifies whether to enable accelerated networking or not.
    dnsSettings ScaleSetNetworkProfileDnsSettings
    A dns_settings block as documented below.
    ipForwarding boolean
    Whether IP forwarding is enabled on this NIC. Defaults to false.
    networkSecurityGroupId string
    Specifies the identifier for the network security group.
    ip_configurations Sequence[ScaleSetNetworkProfileIpConfiguration]
    An ip_configuration block as documented below.
    name str
    Specifies the name of the network interface configuration.
    primary bool
    Indicates whether network interfaces created from the network interface configuration will be the primary NIC of the VM.
    accelerated_networking bool
    Specifies whether to enable accelerated networking or not.
    dns_settings ScaleSetNetworkProfileDnsSettings
    A dns_settings block as documented below.
    ip_forwarding bool
    Whether IP forwarding is enabled on this NIC. Defaults to false.
    network_security_group_id str
    Specifies the identifier for the network security group.
    ipConfigurations List<Property Map>
    An ip_configuration block as documented below.
    name String
    Specifies the name of the network interface configuration.
    primary Boolean
    Indicates whether network interfaces created from the network interface configuration will be the primary NIC of the VM.
    acceleratedNetworking Boolean
    Specifies whether to enable accelerated networking or not.
    dnsSettings Property Map
    A dns_settings block as documented below.
    ipForwarding Boolean
    Whether IP forwarding is enabled on this NIC. Defaults to false.
    networkSecurityGroupId String
    Specifies the identifier for the network security group.

    ScaleSetNetworkProfileDnsSettings, ScaleSetNetworkProfileDnsSettingsArgs

    DnsServers List<string>
    Specifies an array of DNS servers.
    DnsServers []string
    Specifies an array of DNS servers.
    dnsServers List<String>
    Specifies an array of DNS servers.
    dnsServers string[]
    Specifies an array of DNS servers.
    dns_servers Sequence[str]
    Specifies an array of DNS servers.
    dnsServers List<String>
    Specifies an array of DNS servers.

    ScaleSetNetworkProfileIpConfiguration, ScaleSetNetworkProfileIpConfigurationArgs

    Name string
    Specifies name of the IP configuration.
    Primary bool
    Specifies if this ip_configuration is the primary one.
    SubnetId string
    Specifies the identifier of the subnet.
    ApplicationGatewayBackendAddressPoolIds List<string>
    Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets can use the same application gateway.
    ApplicationSecurityGroupIds List<string>
    Specifies up to 20 application security group IDs.
    LoadBalancerBackendAddressPoolIds List<string>

    Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    LoadBalancerInboundNatRulesIds List<string>

    Specifies an array of references to inbound NAT pools for load balancers. A scale set can reference inbound NAT pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    PublicIpAddressConfiguration ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfiguration
    Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. The public_ip_address_configuration block is documented below.
    Name string
    Specifies name of the IP configuration.
    Primary bool
    Specifies if this ip_configuration is the primary one.
    SubnetId string
    Specifies the identifier of the subnet.
    ApplicationGatewayBackendAddressPoolIds []string
    Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets can use the same application gateway.
    ApplicationSecurityGroupIds []string
    Specifies up to 20 application security group IDs.
    LoadBalancerBackendAddressPoolIds []string

    Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    LoadBalancerInboundNatRulesIds []string

    Specifies an array of references to inbound NAT pools for load balancers. A scale set can reference inbound NAT pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    PublicIpAddressConfiguration ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfiguration
    Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. The public_ip_address_configuration block is documented below.
    name String
    Specifies name of the IP configuration.
    primary Boolean
    Specifies if this ip_configuration is the primary one.
    subnetId String
    Specifies the identifier of the subnet.
    applicationGatewayBackendAddressPoolIds List<String>
    Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets can use the same application gateway.
    applicationSecurityGroupIds List<String>
    Specifies up to 20 application security group IDs.
    loadBalancerBackendAddressPoolIds List<String>

    Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    loadBalancerInboundNatRulesIds List<String>

    Specifies an array of references to inbound NAT pools for load balancers. A scale set can reference inbound NAT pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    publicIpAddressConfiguration ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfiguration
    Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. The public_ip_address_configuration block is documented below.
    name string
    Specifies name of the IP configuration.
    primary boolean
    Specifies if this ip_configuration is the primary one.
    subnetId string
    Specifies the identifier of the subnet.
    applicationGatewayBackendAddressPoolIds string[]
    Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets can use the same application gateway.
    applicationSecurityGroupIds string[]
    Specifies up to 20 application security group IDs.
    loadBalancerBackendAddressPoolIds string[]

    Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    loadBalancerInboundNatRulesIds string[]

    Specifies an array of references to inbound NAT pools for load balancers. A scale set can reference inbound NAT pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    publicIpAddressConfiguration ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfiguration
    Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. The public_ip_address_configuration block is documented below.
    name str
    Specifies name of the IP configuration.
    primary bool
    Specifies if this ip_configuration is the primary one.
    subnet_id str
    Specifies the identifier of the subnet.
    application_gateway_backend_address_pool_ids Sequence[str]
    Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets can use the same application gateway.
    application_security_group_ids Sequence[str]
    Specifies up to 20 application security group IDs.
    load_balancer_backend_address_pool_ids Sequence[str]

    Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    load_balancer_inbound_nat_rules_ids Sequence[str]

    Specifies an array of references to inbound NAT pools for load balancers. A scale set can reference inbound NAT pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    public_ip_address_configuration ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfiguration
    Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. The public_ip_address_configuration block is documented below.
    name String
    Specifies name of the IP configuration.
    primary Boolean
    Specifies if this ip_configuration is the primary one.
    subnetId String
    Specifies the identifier of the subnet.
    applicationGatewayBackendAddressPoolIds List<String>
    Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets can use the same application gateway.
    applicationSecurityGroupIds List<String>
    Specifies up to 20 application security group IDs.
    loadBalancerBackendAddressPoolIds List<String>

    Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    loadBalancerInboundNatRulesIds List<String>

    Specifies an array of references to inbound NAT pools for load balancers. A scale set can reference inbound NAT pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

    NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.

    publicIpAddressConfiguration Property Map
    Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. The public_ip_address_configuration block is documented below.

    ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfiguration, ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfigurationArgs

    DomainNameLabel string
    The domain name label for the DNS settings.
    IdleTimeout int
    The idle timeout in minutes. This value must be between 4 and 30.
    Name string
    The name of the public IP address configuration
    DomainNameLabel string
    The domain name label for the DNS settings.
    IdleTimeout int
    The idle timeout in minutes. This value must be between 4 and 30.
    Name string
    The name of the public IP address configuration
    domainNameLabel String
    The domain name label for the DNS settings.
    idleTimeout Integer
    The idle timeout in minutes. This value must be between 4 and 30.
    name String
    The name of the public IP address configuration
    domainNameLabel string
    The domain name label for the DNS settings.
    idleTimeout number
    The idle timeout in minutes. This value must be between 4 and 30.
    name string
    The name of the public IP address configuration
    domain_name_label str
    The domain name label for the DNS settings.
    idle_timeout int
    The idle timeout in minutes. This value must be between 4 and 30.
    name str
    The name of the public IP address configuration
    domainNameLabel String
    The domain name label for the DNS settings.
    idleTimeout Number
    The idle timeout in minutes. This value must be between 4 and 30.
    name String
    The name of the public IP address configuration

    ScaleSetOsProfile, ScaleSetOsProfileArgs

    AdminUsername string
    Specifies the administrator account name to use for all the instances of virtual machines in the scale set.
    ComputerNamePrefix string
    Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 9 characters long for windows images and 1 - 58 for Linux. Changing this forces a new resource to be created.
    AdminPassword string
    Specifies the administrator password to use for all the instances of virtual machines in a scale set.
    CustomData string
    Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes.
    AdminUsername string
    Specifies the administrator account name to use for all the instances of virtual machines in the scale set.
    ComputerNamePrefix string
    Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 9 characters long for windows images and 1 - 58 for Linux. Changing this forces a new resource to be created.
    AdminPassword string
    Specifies the administrator password to use for all the instances of virtual machines in a scale set.
    CustomData string
    Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes.
    adminUsername String
    Specifies the administrator account name to use for all the instances of virtual machines in the scale set.
    computerNamePrefix String
    Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 9 characters long for windows images and 1 - 58 for Linux. Changing this forces a new resource to be created.
    adminPassword String
    Specifies the administrator password to use for all the instances of virtual machines in a scale set.
    customData String
    Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes.
    adminUsername string
    Specifies the administrator account name to use for all the instances of virtual machines in the scale set.
    computerNamePrefix string
    Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 9 characters long for windows images and 1 - 58 for Linux. Changing this forces a new resource to be created.
    adminPassword string
    Specifies the administrator password to use for all the instances of virtual machines in a scale set.
    customData string
    Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes.
    admin_username str
    Specifies the administrator account name to use for all the instances of virtual machines in the scale set.
    computer_name_prefix str
    Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 9 characters long for windows images and 1 - 58 for Linux. Changing this forces a new resource to be created.
    admin_password str
    Specifies the administrator password to use for all the instances of virtual machines in a scale set.
    custom_data str
    Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes.
    adminUsername String
    Specifies the administrator account name to use for all the instances of virtual machines in the scale set.
    computerNamePrefix String
    Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 9 characters long for windows images and 1 - 58 for Linux. Changing this forces a new resource to be created.
    adminPassword String
    Specifies the administrator password to use for all the instances of virtual machines in a scale set.
    customData String
    Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes.

    ScaleSetOsProfileLinuxConfig, ScaleSetOsProfileLinuxConfigArgs

    DisablePasswordAuthentication bool
    Specifies whether password authentication should be disabled. Defaults to false. Changing this forces a new resource to be created.
    SshKeys List<ScaleSetOsProfileLinuxConfigSshKey>

    One or more ssh_keys blocks as defined below.

    Note: Please note that the only allowed path is /home/<username>/.ssh/authorized_keys due to a limitation of Azure.

    NOTE: At least one ssh_keys block is required if disable_password_authentication is set to true.

    DisablePasswordAuthentication bool
    Specifies whether password authentication should be disabled. Defaults to false. Changing this forces a new resource to be created.
    SshKeys []ScaleSetOsProfileLinuxConfigSshKey

    One or more ssh_keys blocks as defined below.

    Note: Please note that the only allowed path is /home/<username>/.ssh/authorized_keys due to a limitation of Azure.

    NOTE: At least one ssh_keys block is required if disable_password_authentication is set to true.

    disablePasswordAuthentication Boolean
    Specifies whether password authentication should be disabled. Defaults to false. Changing this forces a new resource to be created.
    sshKeys List<ScaleSetOsProfileLinuxConfigSshKey>

    One or more ssh_keys blocks as defined below.

    Note: Please note that the only allowed path is /home/<username>/.ssh/authorized_keys due to a limitation of Azure.

    NOTE: At least one ssh_keys block is required if disable_password_authentication is set to true.

    disablePasswordAuthentication boolean
    Specifies whether password authentication should be disabled. Defaults to false. Changing this forces a new resource to be created.
    sshKeys ScaleSetOsProfileLinuxConfigSshKey[]

    One or more ssh_keys blocks as defined below.

    Note: Please note that the only allowed path is /home/<username>/.ssh/authorized_keys due to a limitation of Azure.

    NOTE: At least one ssh_keys block is required if disable_password_authentication is set to true.

    disable_password_authentication bool
    Specifies whether password authentication should be disabled. Defaults to false. Changing this forces a new resource to be created.
    ssh_keys Sequence[ScaleSetOsProfileLinuxConfigSshKey]

    One or more ssh_keys blocks as defined below.

    Note: Please note that the only allowed path is /home/<username>/.ssh/authorized_keys due to a limitation of Azure.

    NOTE: At least one ssh_keys block is required if disable_password_authentication is set to true.

    disablePasswordAuthentication Boolean
    Specifies whether password authentication should be disabled. Defaults to false. Changing this forces a new resource to be created.
    sshKeys List<Property Map>

    One or more ssh_keys blocks as defined below.

    Note: Please note that the only allowed path is /home/<username>/.ssh/authorized_keys due to a limitation of Azure.

    NOTE: At least one ssh_keys block is required if disable_password_authentication is set to true.

    ScaleSetOsProfileLinuxConfigSshKey, ScaleSetOsProfileLinuxConfigSshKeyArgs

    Path string

    The path of the destination file on the virtual machine

    NOTE: Due to a limitation in the Azure VM Agent the only allowed path is /home/{username}/.ssh/authorized_keys.

    KeyData string

    The Public SSH Key which should be written to the path defined above.

    Note: Azure only supports RSA SSH2 key signatures of at least 2048 bits in length

    NOTE: Rather than defining this in-line you can source this from a local file using the file function - for example key_data = file("~/.ssh/id_rsa.pub").

    Path string

    The path of the destination file on the virtual machine

    NOTE: Due to a limitation in the Azure VM Agent the only allowed path is /home/{username}/.ssh/authorized_keys.

    KeyData string

    The Public SSH Key which should be written to the path defined above.

    Note: Azure only supports RSA SSH2 key signatures of at least 2048 bits in length

    NOTE: Rather than defining this in-line you can source this from a local file using the file function - for example key_data = file("~/.ssh/id_rsa.pub").

    path String

    The path of the destination file on the virtual machine

    NOTE: Due to a limitation in the Azure VM Agent the only allowed path is /home/{username}/.ssh/authorized_keys.

    keyData String

    The Public SSH Key which should be written to the path defined above.

    Note: Azure only supports RSA SSH2 key signatures of at least 2048 bits in length

    NOTE: Rather than defining this in-line you can source this from a local file using the file function - for example key_data = file("~/.ssh/id_rsa.pub").

    path string

    The path of the destination file on the virtual machine

    NOTE: Due to a limitation in the Azure VM Agent the only allowed path is /home/{username}/.ssh/authorized_keys.

    keyData string

    The Public SSH Key which should be written to the path defined above.

    Note: Azure only supports RSA SSH2 key signatures of at least 2048 bits in length

    NOTE: Rather than defining this in-line you can source this from a local file using the file function - for example key_data = file("~/.ssh/id_rsa.pub").

    path str

    The path of the destination file on the virtual machine

    NOTE: Due to a limitation in the Azure VM Agent the only allowed path is /home/{username}/.ssh/authorized_keys.

    key_data str

    The Public SSH Key which should be written to the path defined above.

    Note: Azure only supports RSA SSH2 key signatures of at least 2048 bits in length

    NOTE: Rather than defining this in-line you can source this from a local file using the file function - for example key_data = file("~/.ssh/id_rsa.pub").

    path String

    The path of the destination file on the virtual machine

    NOTE: Due to a limitation in the Azure VM Agent the only allowed path is /home/{username}/.ssh/authorized_keys.

    keyData String

    The Public SSH Key which should be written to the path defined above.

    Note: Azure only supports RSA SSH2 key signatures of at least 2048 bits in length

    NOTE: Rather than defining this in-line you can source this from a local file using the file function - for example key_data = file("~/.ssh/id_rsa.pub").

    ScaleSetOsProfileSecret, ScaleSetOsProfileSecretArgs

    SourceVaultId string
    Specifies the key vault to use.
    VaultCertificates List<ScaleSetOsProfileSecretVaultCertificate>
    (Required, on Windows machines) One or more vault_certificates blocks as defined below.
    SourceVaultId string
    Specifies the key vault to use.
    VaultCertificates []ScaleSetOsProfileSecretVaultCertificate
    (Required, on Windows machines) One or more vault_certificates blocks as defined below.
    sourceVaultId String
    Specifies the key vault to use.
    vaultCertificates List<ScaleSetOsProfileSecretVaultCertificate>
    (Required, on Windows machines) One or more vault_certificates blocks as defined below.
    sourceVaultId string
    Specifies the key vault to use.
    vaultCertificates ScaleSetOsProfileSecretVaultCertificate[]
    (Required, on Windows machines) One or more vault_certificates blocks as defined below.
    source_vault_id str
    Specifies the key vault to use.
    vault_certificates Sequence[ScaleSetOsProfileSecretVaultCertificate]
    (Required, on Windows machines) One or more vault_certificates blocks as defined below.
    sourceVaultId String
    Specifies the key vault to use.
    vaultCertificates List<Property Map>
    (Required, on Windows machines) One or more vault_certificates blocks as defined below.

    ScaleSetOsProfileSecretVaultCertificate, ScaleSetOsProfileSecretVaultCertificateArgs

    CertificateUrl string
    It is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be data, dataType and password.
    CertificateStore string
    (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to.
    CertificateUrl string
    It is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be data, dataType and password.
    CertificateStore string
    (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to.
    certificateUrl String
    It is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be data, dataType and password.
    certificateStore String
    (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to.
    certificateUrl string
    It is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be data, dataType and password.
    certificateStore string
    (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to.
    certificate_url str
    It is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be data, dataType and password.
    certificate_store str
    (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to.
    certificateUrl String
    It is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be data, dataType and password.
    certificateStore String
    (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to.

    ScaleSetOsProfileWindowsConfig, ScaleSetOsProfileWindowsConfigArgs

    AdditionalUnattendConfigs List<ScaleSetOsProfileWindowsConfigAdditionalUnattendConfig>
    An additional_unattend_config block as documented below.
    EnableAutomaticUpgrades bool
    Indicates whether virtual machines in the scale set are enabled for automatic updates.
    ProvisionVmAgent bool
    Indicates whether virtual machine agent should be provisioned on the virtual machines in the scale set.
    Winrms List<ScaleSetOsProfileWindowsConfigWinrm>
    A collection of winrm blocks as documented below.
    AdditionalUnattendConfigs []ScaleSetOsProfileWindowsConfigAdditionalUnattendConfig
    An additional_unattend_config block as documented below.
    EnableAutomaticUpgrades bool
    Indicates whether virtual machines in the scale set are enabled for automatic updates.
    ProvisionVmAgent bool
    Indicates whether virtual machine agent should be provisioned on the virtual machines in the scale set.
    Winrms []ScaleSetOsProfileWindowsConfigWinrm
    A collection of winrm blocks as documented below.
    additionalUnattendConfigs List<ScaleSetOsProfileWindowsConfigAdditionalUnattendConfig>
    An additional_unattend_config block as documented below.
    enableAutomaticUpgrades Boolean
    Indicates whether virtual machines in the scale set are enabled for automatic updates.
    provisionVmAgent Boolean
    Indicates whether virtual machine agent should be provisioned on the virtual machines in the scale set.
    winrms List<ScaleSetOsProfileWindowsConfigWinrm>
    A collection of winrm blocks as documented below.
    additionalUnattendConfigs ScaleSetOsProfileWindowsConfigAdditionalUnattendConfig[]
    An additional_unattend_config block as documented below.
    enableAutomaticUpgrades boolean
    Indicates whether virtual machines in the scale set are enabled for automatic updates.
    provisionVmAgent boolean
    Indicates whether virtual machine agent should be provisioned on the virtual machines in the scale set.
    winrms ScaleSetOsProfileWindowsConfigWinrm[]
    A collection of winrm blocks as documented below.
    additional_unattend_configs Sequence[ScaleSetOsProfileWindowsConfigAdditionalUnattendConfig]
    An additional_unattend_config block as documented below.
    enable_automatic_upgrades bool
    Indicates whether virtual machines in the scale set are enabled for automatic updates.
    provision_vm_agent bool
    Indicates whether virtual machine agent should be provisioned on the virtual machines in the scale set.
    winrms Sequence[ScaleSetOsProfileWindowsConfigWinrm]
    A collection of winrm blocks as documented below.
    additionalUnattendConfigs List<Property Map>
    An additional_unattend_config block as documented below.
    enableAutomaticUpgrades Boolean
    Indicates whether virtual machines in the scale set are enabled for automatic updates.
    provisionVmAgent Boolean
    Indicates whether virtual machine agent should be provisioned on the virtual machines in the scale set.
    winrms List<Property Map>
    A collection of winrm blocks as documented below.

    ScaleSetOsProfileWindowsConfigAdditionalUnattendConfig, ScaleSetOsProfileWindowsConfigAdditionalUnattendConfigArgs

    Component string
    Specifies the name of the component to configure with the added content. The only allowable value is Microsoft-Windows-Shell-Setup.
    Content string
    Specifies the base-64 encoded XML formatted content that is added to the unattend.xml file for the specified path and component.
    Pass string
    Specifies the name of the pass that the content applies to. The only allowable value is oobeSystem.
    SettingName string
    Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
    Component string
    Specifies the name of the component to configure with the added content. The only allowable value is Microsoft-Windows-Shell-Setup.
    Content string
    Specifies the base-64 encoded XML formatted content that is added to the unattend.xml file for the specified path and component.
    Pass string
    Specifies the name of the pass that the content applies to. The only allowable value is oobeSystem.
    SettingName string
    Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
    component String
    Specifies the name of the component to configure with the added content. The only allowable value is Microsoft-Windows-Shell-Setup.
    content String
    Specifies the base-64 encoded XML formatted content that is added to the unattend.xml file for the specified path and component.
    pass String
    Specifies the name of the pass that the content applies to. The only allowable value is oobeSystem.
    settingName String
    Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
    component string
    Specifies the name of the component to configure with the added content. The only allowable value is Microsoft-Windows-Shell-Setup.
    content string
    Specifies the base-64 encoded XML formatted content that is added to the unattend.xml file for the specified path and component.
    pass string
    Specifies the name of the pass that the content applies to. The only allowable value is oobeSystem.
    settingName string
    Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
    component str
    Specifies the name of the component to configure with the added content. The only allowable value is Microsoft-Windows-Shell-Setup.
    content str
    Specifies the base-64 encoded XML formatted content that is added to the unattend.xml file for the specified path and component.
    pass_ str
    Specifies the name of the pass that the content applies to. The only allowable value is oobeSystem.
    setting_name str
    Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
    component String
    Specifies the name of the component to configure with the added content. The only allowable value is Microsoft-Windows-Shell-Setup.
    content String
    Specifies the base-64 encoded XML formatted content that is added to the unattend.xml file for the specified path and component.
    pass String
    Specifies the name of the pass that the content applies to. The only allowable value is oobeSystem.
    settingName String
    Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.

    ScaleSetOsProfileWindowsConfigWinrm, ScaleSetOsProfileWindowsConfigWinrmArgs

    Protocol string
    Specifies the protocol of listener
    CertificateUrl string
    Specifies URL of the certificate with which new Virtual Machines is provisioned.
    Protocol string
    Specifies the protocol of listener
    CertificateUrl string
    Specifies URL of the certificate with which new Virtual Machines is provisioned.
    protocol String
    Specifies the protocol of listener
    certificateUrl String
    Specifies URL of the certificate with which new Virtual Machines is provisioned.
    protocol string
    Specifies the protocol of listener
    certificateUrl string
    Specifies URL of the certificate with which new Virtual Machines is provisioned.
    protocol str
    Specifies the protocol of listener
    certificate_url str
    Specifies URL of the certificate with which new Virtual Machines is provisioned.
    protocol String
    Specifies the protocol of listener
    certificateUrl String
    Specifies URL of the certificate with which new Virtual Machines is provisioned.

    ScaleSetPlan, ScaleSetPlanArgs

    Name string
    Specifies the name of the image from the marketplace.
    Product string
    Specifies the product of the image from the marketplace.
    Publisher string
    Specifies the publisher of the image.
    Name string
    Specifies the name of the image from the marketplace.
    Product string
    Specifies the product of the image from the marketplace.
    Publisher string
    Specifies the publisher of the image.
    name String
    Specifies the name of the image from the marketplace.
    product String
    Specifies the product of the image from the marketplace.
    publisher String
    Specifies the publisher of the image.
    name string
    Specifies the name of the image from the marketplace.
    product string
    Specifies the product of the image from the marketplace.
    publisher string
    Specifies the publisher of the image.
    name str
    Specifies the name of the image from the marketplace.
    product str
    Specifies the product of the image from the marketplace.
    publisher str
    Specifies the publisher of the image.
    name String
    Specifies the name of the image from the marketplace.
    product String
    Specifies the product of the image from the marketplace.
    publisher String
    Specifies the publisher of the image.

    ScaleSetRollingUpgradePolicy, ScaleSetRollingUpgradePolicyArgs

    MaxBatchInstancePercent int
    The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. Defaults to 20.
    MaxUnhealthyInstancePercent int
    The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. Defaults to 20.
    MaxUnhealthyUpgradedInstancePercent int
    The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. Defaults to 20.
    PauseTimeBetweenBatches string
    The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format for duration (https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to PT0S seconds represented as PT0S.
    MaxBatchInstancePercent int
    The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. Defaults to 20.
    MaxUnhealthyInstancePercent int
    The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. Defaults to 20.
    MaxUnhealthyUpgradedInstancePercent int
    The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. Defaults to 20.
    PauseTimeBetweenBatches string
    The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format for duration (https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to PT0S seconds represented as PT0S.
    maxBatchInstancePercent Integer
    The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. Defaults to 20.
    maxUnhealthyInstancePercent Integer
    The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. Defaults to 20.
    maxUnhealthyUpgradedInstancePercent Integer
    The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. Defaults to 20.
    pauseTimeBetweenBatches String
    The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format for duration (https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to PT0S seconds represented as PT0S.
    maxBatchInstancePercent number
    The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. Defaults to 20.
    maxUnhealthyInstancePercent number
    The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. Defaults to 20.
    maxUnhealthyUpgradedInstancePercent number
    The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. Defaults to 20.
    pauseTimeBetweenBatches string
    The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format for duration (https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to PT0S seconds represented as PT0S.
    max_batch_instance_percent int
    The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. Defaults to 20.
    max_unhealthy_instance_percent int
    The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. Defaults to 20.
    max_unhealthy_upgraded_instance_percent int
    The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. Defaults to 20.
    pause_time_between_batches str
    The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format for duration (https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to PT0S seconds represented as PT0S.
    maxBatchInstancePercent Number
    The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. Defaults to 20.
    maxUnhealthyInstancePercent Number
    The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. Defaults to 20.
    maxUnhealthyUpgradedInstancePercent Number
    The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. Defaults to 20.
    pauseTimeBetweenBatches String
    The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format for duration (https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to PT0S seconds represented as PT0S.

    ScaleSetSku, ScaleSetSkuArgs

    Capacity int
    Specifies the number of virtual machines in the scale set.
    Name string
    Specifies the size of virtual machines in a scale set.
    Tier string
    Specifies the tier of virtual machines in a scale set. Possible values, standard or basic.
    Capacity int
    Specifies the number of virtual machines in the scale set.
    Name string
    Specifies the size of virtual machines in a scale set.
    Tier string
    Specifies the tier of virtual machines in a scale set. Possible values, standard or basic.
    capacity Integer
    Specifies the number of virtual machines in the scale set.
    name String
    Specifies the size of virtual machines in a scale set.
    tier String
    Specifies the tier of virtual machines in a scale set. Possible values, standard or basic.
    capacity number
    Specifies the number of virtual machines in the scale set.
    name string
    Specifies the size of virtual machines in a scale set.
    tier string
    Specifies the tier of virtual machines in a scale set. Possible values, standard or basic.
    capacity int
    Specifies the number of virtual machines in the scale set.
    name str
    Specifies the size of virtual machines in a scale set.
    tier str
    Specifies the tier of virtual machines in a scale set. Possible values, standard or basic.
    capacity Number
    Specifies the number of virtual machines in the scale set.
    name String
    Specifies the size of virtual machines in a scale set.
    tier String
    Specifies the tier of virtual machines in a scale set. Possible values, standard or basic.

    ScaleSetStorageProfileDataDisk, ScaleSetStorageProfileDataDiskArgs

    CreateOption string
    Specifies how the data disk should be created. The only possible options are FromImage and Empty.
    Lun int
    Specifies the Logical Unit Number of the disk in each virtual machine in the scale set.
    Caching string
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    DiskSizeGb int
    Specifies the size of the disk in GB. This element is required when creating an empty disk.
    ManagedDiskType string
    Specifies the type of managed disk to create. Value must be either Standard_LRS, StandardSSD_LRS or Premium_LRS.
    CreateOption string
    Specifies how the data disk should be created. The only possible options are FromImage and Empty.
    Lun int
    Specifies the Logical Unit Number of the disk in each virtual machine in the scale set.
    Caching string
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    DiskSizeGb int
    Specifies the size of the disk in GB. This element is required when creating an empty disk.
    ManagedDiskType string
    Specifies the type of managed disk to create. Value must be either Standard_LRS, StandardSSD_LRS or Premium_LRS.
    createOption String
    Specifies how the data disk should be created. The only possible options are FromImage and Empty.
    lun Integer
    Specifies the Logical Unit Number of the disk in each virtual machine in the scale set.
    caching String
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    diskSizeGb Integer
    Specifies the size of the disk in GB. This element is required when creating an empty disk.
    managedDiskType String
    Specifies the type of managed disk to create. Value must be either Standard_LRS, StandardSSD_LRS or Premium_LRS.
    createOption string
    Specifies how the data disk should be created. The only possible options are FromImage and Empty.
    lun number
    Specifies the Logical Unit Number of the disk in each virtual machine in the scale set.
    caching string
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    diskSizeGb number
    Specifies the size of the disk in GB. This element is required when creating an empty disk.
    managedDiskType string
    Specifies the type of managed disk to create. Value must be either Standard_LRS, StandardSSD_LRS or Premium_LRS.
    create_option str
    Specifies how the data disk should be created. The only possible options are FromImage and Empty.
    lun int
    Specifies the Logical Unit Number of the disk in each virtual machine in the scale set.
    caching str
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    disk_size_gb int
    Specifies the size of the disk in GB. This element is required when creating an empty disk.
    managed_disk_type str
    Specifies the type of managed disk to create. Value must be either Standard_LRS, StandardSSD_LRS or Premium_LRS.
    createOption String
    Specifies how the data disk should be created. The only possible options are FromImage and Empty.
    lun Number
    Specifies the Logical Unit Number of the disk in each virtual machine in the scale set.
    caching String
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    diskSizeGb Number
    Specifies the size of the disk in GB. This element is required when creating an empty disk.
    managedDiskType String
    Specifies the type of managed disk to create. Value must be either Standard_LRS, StandardSSD_LRS or Premium_LRS.

    ScaleSetStorageProfileImageReference, ScaleSetStorageProfileImageReferenceArgs

    Id string
    Specifies the ID of the (custom) image to use to create the virtual machine scale set, as in the example below.
    Offer string
    Specifies the offer of the image used to create the virtual machines.
    Publisher string
    Specifies the publisher of the image used to create the virtual machines.
    Sku string
    Specifies the SKU of the image used to create the virtual machines.
    Version string
    Specifies the version of the image used to create the virtual machines.
    Id string
    Specifies the ID of the (custom) image to use to create the virtual machine scale set, as in the example below.
    Offer string
    Specifies the offer of the image used to create the virtual machines.
    Publisher string
    Specifies the publisher of the image used to create the virtual machines.
    Sku string
    Specifies the SKU of the image used to create the virtual machines.
    Version string
    Specifies the version of the image used to create the virtual machines.
    id String
    Specifies the ID of the (custom) image to use to create the virtual machine scale set, as in the example below.
    offer String
    Specifies the offer of the image used to create the virtual machines.
    publisher String
    Specifies the publisher of the image used to create the virtual machines.
    sku String
    Specifies the SKU of the image used to create the virtual machines.
    version String
    Specifies the version of the image used to create the virtual machines.
    id string
    Specifies the ID of the (custom) image to use to create the virtual machine scale set, as in the example below.
    offer string
    Specifies the offer of the image used to create the virtual machines.
    publisher string
    Specifies the publisher of the image used to create the virtual machines.
    sku string
    Specifies the SKU of the image used to create the virtual machines.
    version string
    Specifies the version of the image used to create the virtual machines.
    id str
    Specifies the ID of the (custom) image to use to create the virtual machine scale set, as in the example below.
    offer str
    Specifies the offer of the image used to create the virtual machines.
    publisher str
    Specifies the publisher of the image used to create the virtual machines.
    sku str
    Specifies the SKU of the image used to create the virtual machines.
    version str
    Specifies the version of the image used to create the virtual machines.
    id String
    Specifies the ID of the (custom) image to use to create the virtual machine scale set, as in the example below.
    offer String
    Specifies the offer of the image used to create the virtual machines.
    publisher String
    Specifies the publisher of the image used to create the virtual machines.
    sku String
    Specifies the SKU of the image used to create the virtual machines.
    version String
    Specifies the version of the image used to create the virtual machines.

    ScaleSetStorageProfileOsDisk, ScaleSetStorageProfileOsDiskArgs

    CreateOption string
    Specifies how the virtual machine should be created. The only possible option is FromImage.
    Caching string
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    Image string
    Specifies the blob URI for user image. A virtual machine scale set creates an os disk in the same container as the user image. Updating the osDisk image causes the existing disk to be deleted and a new one created with the new image. If the VM scale set is in Manual upgrade mode then the virtual machines are not updated until they have manualUpgrade applied to them. When setting this field os_type needs to be specified. Cannot be used when vhd_containers, managed_disk_type or storage_profile_image_reference are specified.
    ManagedDiskType string
    Specifies the type of managed disk to create. Value you must be either Standard_LRS, StandardSSD_LRS or Premium_LRS. Cannot be used when vhd_containers or image is specified.
    Name string
    Specifies the disk name. Must be specified when using unmanaged disk ('managed_disk_type' property not set).
    OsType string
    Specifies the operating system Type, valid values are windows, Linux.
    VhdContainers List<string>
    Specifies the VHD URI. Cannot be used when image or managed_disk_type is specified.
    CreateOption string
    Specifies how the virtual machine should be created. The only possible option is FromImage.
    Caching string
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    Image string
    Specifies the blob URI for user image. A virtual machine scale set creates an os disk in the same container as the user image. Updating the osDisk image causes the existing disk to be deleted and a new one created with the new image. If the VM scale set is in Manual upgrade mode then the virtual machines are not updated until they have manualUpgrade applied to them. When setting this field os_type needs to be specified. Cannot be used when vhd_containers, managed_disk_type or storage_profile_image_reference are specified.
    ManagedDiskType string
    Specifies the type of managed disk to create. Value you must be either Standard_LRS, StandardSSD_LRS or Premium_LRS. Cannot be used when vhd_containers or image is specified.
    Name string
    Specifies the disk name. Must be specified when using unmanaged disk ('managed_disk_type' property not set).
    OsType string
    Specifies the operating system Type, valid values are windows, Linux.
    VhdContainers []string
    Specifies the VHD URI. Cannot be used when image or managed_disk_type is specified.
    createOption String
    Specifies how the virtual machine should be created. The only possible option is FromImage.
    caching String
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    image String
    Specifies the blob URI for user image. A virtual machine scale set creates an os disk in the same container as the user image. Updating the osDisk image causes the existing disk to be deleted and a new one created with the new image. If the VM scale set is in Manual upgrade mode then the virtual machines are not updated until they have manualUpgrade applied to them. When setting this field os_type needs to be specified. Cannot be used when vhd_containers, managed_disk_type or storage_profile_image_reference are specified.
    managedDiskType String
    Specifies the type of managed disk to create. Value you must be either Standard_LRS, StandardSSD_LRS or Premium_LRS. Cannot be used when vhd_containers or image is specified.
    name String
    Specifies the disk name. Must be specified when using unmanaged disk ('managed_disk_type' property not set).
    osType String
    Specifies the operating system Type, valid values are windows, Linux.
    vhdContainers List<String>
    Specifies the VHD URI. Cannot be used when image or managed_disk_type is specified.
    createOption string
    Specifies how the virtual machine should be created. The only possible option is FromImage.
    caching string
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    image string
    Specifies the blob URI for user image. A virtual machine scale set creates an os disk in the same container as the user image. Updating the osDisk image causes the existing disk to be deleted and a new one created with the new image. If the VM scale set is in Manual upgrade mode then the virtual machines are not updated until they have manualUpgrade applied to them. When setting this field os_type needs to be specified. Cannot be used when vhd_containers, managed_disk_type or storage_profile_image_reference are specified.
    managedDiskType string
    Specifies the type of managed disk to create. Value you must be either Standard_LRS, StandardSSD_LRS or Premium_LRS. Cannot be used when vhd_containers or image is specified.
    name string
    Specifies the disk name. Must be specified when using unmanaged disk ('managed_disk_type' property not set).
    osType string
    Specifies the operating system Type, valid values are windows, Linux.
    vhdContainers string[]
    Specifies the VHD URI. Cannot be used when image or managed_disk_type is specified.
    create_option str
    Specifies how the virtual machine should be created. The only possible option is FromImage.
    caching str
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    image str
    Specifies the blob URI for user image. A virtual machine scale set creates an os disk in the same container as the user image. Updating the osDisk image causes the existing disk to be deleted and a new one created with the new image. If the VM scale set is in Manual upgrade mode then the virtual machines are not updated until they have manualUpgrade applied to them. When setting this field os_type needs to be specified. Cannot be used when vhd_containers, managed_disk_type or storage_profile_image_reference are specified.
    managed_disk_type str
    Specifies the type of managed disk to create. Value you must be either Standard_LRS, StandardSSD_LRS or Premium_LRS. Cannot be used when vhd_containers or image is specified.
    name str
    Specifies the disk name. Must be specified when using unmanaged disk ('managed_disk_type' property not set).
    os_type str
    Specifies the operating system Type, valid values are windows, Linux.
    vhd_containers Sequence[str]
    Specifies the VHD URI. Cannot be used when image or managed_disk_type is specified.
    createOption String
    Specifies how the virtual machine should be created. The only possible option is FromImage.
    caching String
    Specifies the caching requirements. Possible values include: None (default), ReadOnly, ReadWrite.
    image String
    Specifies the blob URI for user image. A virtual machine scale set creates an os disk in the same container as the user image. Updating the osDisk image causes the existing disk to be deleted and a new one created with the new image. If the VM scale set is in Manual upgrade mode then the virtual machines are not updated until they have manualUpgrade applied to them. When setting this field os_type needs to be specified. Cannot be used when vhd_containers, managed_disk_type or storage_profile_image_reference are specified.
    managedDiskType String
    Specifies the type of managed disk to create. Value you must be either Standard_LRS, StandardSSD_LRS or Premium_LRS. Cannot be used when vhd_containers or image is specified.
    name String
    Specifies the disk name. Must be specified when using unmanaged disk ('managed_disk_type' property not set).
    osType String
    Specifies the operating system Type, valid values are windows, Linux.
    vhdContainers List<String>
    Specifies the VHD URI. Cannot be used when image or managed_disk_type is specified.

    Import

    Virtual Machine Scale Sets can be imported using the resource id, e.g.

    $ pulumi import azure:compute/scaleSet:ScaleSet scaleset1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleset1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi