Windows Virtual Machine Scale Set Args
Manages a Windows Virtual Machine Scale Set.
Disclaimers
NOTE:: All arguments including the administrator login and password will be stored in the raw state as plain-text. NOTE: This provider will automatically update & reimage the nodes in the Scale Set (if Required) during an Update - this behaviour can be configured using the
features
setting within the Provider block. NOTE: This resource does not support Unmanaged Disks. If you need to use Unmanaged Disks you can continue to use theazure.compute.ScaleSet
resource instead
Example Usage
This example provisions a basic Windows Virtual Machine Scale Set on an internal network.
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.compute.WindowsVirtualMachineScaleSet;
import com.pulumi.azure.compute.WindowsVirtualMachineScaleSetArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineScaleSetSourceImageReferenceArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineScaleSetOsDiskArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineScaleSetNetworkInterfaceArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.addressSpaces("10.0.0.0/16")
.build());
var internal = new Subnet("internal", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.build());
var exampleWindowsVirtualMachineScaleSet = new WindowsVirtualMachineScaleSet("exampleWindowsVirtualMachineScaleSet", WindowsVirtualMachineScaleSetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku("Standard_F2")
.instances(1)
.adminPassword("P@55w0rd1234!")
.adminUsername("adminuser")
.sourceImageReference(WindowsVirtualMachineScaleSetSourceImageReferenceArgs.builder()
.publisher("MicrosoftWindowsServer")
.offer("WindowsServer")
.sku("2016-Datacenter-Server-Core")
.version("latest")
.build())
.osDisk(WindowsVirtualMachineScaleSetOsDiskArgs.builder()
.storageAccountType("Standard_LRS")
.caching("ReadWrite")
.build())
.networkInterfaces(WindowsVirtualMachineScaleSetNetworkInterfaceArgs.builder()
.name("example")
.primary(true)
.ipConfigurations(WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs.builder()
.name("internal")
.primary(true)
.subnetId(internal.id())
.build())
.build())
.build());
}
}
Import
Windows Virtual Machine Scale Sets can be imported using the resource id
, e.g.
$ pulumi import azure:compute/windowsVirtualMachineScaleSet:WindowsVirtualMachineScaleSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleset1
Constructors
Functions
Properties
An automatic_instance_repair
block as defined below. To enable the automatic instance repair, this Virtual Machine Scale Set must have a valid health_probe_id
or an Application Health Extension.
The prefix which should be used for the name of the Virtual Machines in this Scale Set. If unspecified this defaults to the value for the name
field. If the value of the name
field is not a valid computer_name_prefix
, then you must specify computer_name_prefix
. Changing this forces a new resource to be created.
Specifies the type of on-premise license (also known as Azure Hybrid Use Benefit) which should be used for this Virtual Machine Scale Set. Possible values are None
, Windows_Client
and Windows_Server
.
The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the eviction_policy
. Defaults to -1
, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons.
Should Azure over-provision Virtual Machines in this Scale Set? This means that multiple Virtual Machines will be provisioned and Azure will keep the instances which become available first - which improves provisioning success rates and improves deployment time. You're not billed for these over-provisioned VM's and they don't count towards the Subscription Quota. Defaults to true
.
Specifies the time zone of the virtual machine, the possible values are defined here.