1. Packages
  2. Azure Classic
  3. API Docs
  4. devtest
  5. WindowsVirtualMachine

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.devtest.WindowsVirtualMachine

Explore with Pulumi AI

Manages a Windows Virtual Machine within a Dev Test Lab.

Example Usage

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

const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleLab = new azure.devtest.Lab("example", {
    name: "example-devtestlab",
    location: example.location,
    resourceGroupName: example.name,
    tags: {
        Sydney: "Australia",
    },
});
const exampleVirtualNetwork = new azure.devtest.VirtualNetwork("example", {
    name: "example-network",
    labName: exampleLab.name,
    resourceGroupName: example.name,
    subnet: {
        usePublicIpAddress: "Allow",
        useInVirtualMachineCreation: "Allow",
    },
});
const exampleWindowsVirtualMachine = new azure.devtest.WindowsVirtualMachine("example", {
    name: "example-vm03",
    labName: exampleLab.name,
    resourceGroupName: example.name,
    location: example.location,
    size: "Standard_DS2",
    username: "exampleuser99",
    password: "Pa$w0rd1234!",
    labVirtualNetworkId: exampleVirtualNetwork.id,
    labSubnetName: exampleVirtualNetwork.subnet.apply(subnet => subnet.name),
    storageType: "Premium",
    notes: "Some notes about this Virtual Machine.",
    galleryImageReference: {
        offer: "WindowsServer",
        publisher: "MicrosoftWindowsServer",
        sku: "2019-Datacenter",
        version: "latest",
    },
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_lab = azure.devtest.Lab("example",
    name="example-devtestlab",
    location=example.location,
    resource_group_name=example.name,
    tags={
        "Sydney": "Australia",
    })
example_virtual_network = azure.devtest.VirtualNetwork("example",
    name="example-network",
    lab_name=example_lab.name,
    resource_group_name=example.name,
    subnet={
        "use_public_ip_address": "Allow",
        "use_in_virtual_machine_creation": "Allow",
    })
example_windows_virtual_machine = azure.devtest.WindowsVirtualMachine("example",
    name="example-vm03",
    lab_name=example_lab.name,
    resource_group_name=example.name,
    location=example.location,
    size="Standard_DS2",
    username="exampleuser99",
    password="Pa$w0rd1234!",
    lab_virtual_network_id=example_virtual_network.id,
    lab_subnet_name=example_virtual_network.subnet.name,
    storage_type="Premium",
    notes="Some notes about this Virtual Machine.",
    gallery_image_reference={
        "offer": "WindowsServer",
        "publisher": "MicrosoftWindowsServer",
        "sku": "2019-Datacenter",
        "version": "latest",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devtest"
	"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
		}
		exampleLab, err := devtest.NewLab(ctx, "example", &devtest.LabArgs{
			Name:              pulumi.String("example-devtestlab"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
			Tags: pulumi.StringMap{
				"Sydney": pulumi.String("Australia"),
			},
		})
		if err != nil {
			return err
		}
		exampleVirtualNetwork, err := devtest.NewVirtualNetwork(ctx, "example", &devtest.VirtualNetworkArgs{
			Name:              pulumi.String("example-network"),
			LabName:           exampleLab.Name,
			ResourceGroupName: example.Name,
			Subnet: &devtest.VirtualNetworkSubnetArgs{
				UsePublicIpAddress:          pulumi.String("Allow"),
				UseInVirtualMachineCreation: pulumi.String("Allow"),
			},
		})
		if err != nil {
			return err
		}
		_, err = devtest.NewWindowsVirtualMachine(ctx, "example", &devtest.WindowsVirtualMachineArgs{
			Name:                pulumi.String("example-vm03"),
			LabName:             exampleLab.Name,
			ResourceGroupName:   example.Name,
			Location:            example.Location,
			Size:                pulumi.String("Standard_DS2"),
			Username:            pulumi.String("exampleuser99"),
			Password:            pulumi.String("Pa$w0rd1234!"),
			LabVirtualNetworkId: exampleVirtualNetwork.ID(),
			LabSubnetName: pulumi.String(exampleVirtualNetwork.Subnet.ApplyT(func(subnet devtest.VirtualNetworkSubnet) (*string, error) {
				return &subnet.Name, nil
			}).(pulumi.StringPtrOutput)),
			StorageType: pulumi.String("Premium"),
			Notes:       pulumi.String("Some notes about this Virtual Machine."),
			GalleryImageReference: &devtest.WindowsVirtualMachineGalleryImageReferenceArgs{
				Offer:     pulumi.String("WindowsServer"),
				Publisher: pulumi.String("MicrosoftWindowsServer"),
				Sku:       pulumi.String("2019-Datacenter"),
				Version:   pulumi.String("latest"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var exampleLab = new Azure.DevTest.Lab("example", new()
    {
        Name = "example-devtestlab",
        Location = example.Location,
        ResourceGroupName = example.Name,
        Tags = 
        {
            { "Sydney", "Australia" },
        },
    });

    var exampleVirtualNetwork = new Azure.DevTest.VirtualNetwork("example", new()
    {
        Name = "example-network",
        LabName = exampleLab.Name,
        ResourceGroupName = example.Name,
        Subnet = new Azure.DevTest.Inputs.VirtualNetworkSubnetArgs
        {
            UsePublicIpAddress = "Allow",
            UseInVirtualMachineCreation = "Allow",
        },
    });

    var exampleWindowsVirtualMachine = new Azure.DevTest.WindowsVirtualMachine("example", new()
    {
        Name = "example-vm03",
        LabName = exampleLab.Name,
        ResourceGroupName = example.Name,
        Location = example.Location,
        Size = "Standard_DS2",
        Username = "exampleuser99",
        Password = "Pa$w0rd1234!",
        LabVirtualNetworkId = exampleVirtualNetwork.Id,
        LabSubnetName = exampleVirtualNetwork.Subnet.Apply(subnet => subnet.Name),
        StorageType = "Premium",
        Notes = "Some notes about this Virtual Machine.",
        GalleryImageReference = new Azure.DevTest.Inputs.WindowsVirtualMachineGalleryImageReferenceArgs
        {
            Offer = "WindowsServer",
            Publisher = "MicrosoftWindowsServer",
            Sku = "2019-Datacenter",
            Version = "latest",
        },
    });

});
Copy
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.devtest.Lab;
import com.pulumi.azure.devtest.LabArgs;
import com.pulumi.azure.devtest.VirtualNetwork;
import com.pulumi.azure.devtest.VirtualNetworkArgs;
import com.pulumi.azure.devtest.inputs.VirtualNetworkSubnetArgs;
import com.pulumi.azure.devtest.WindowsVirtualMachine;
import com.pulumi.azure.devtest.WindowsVirtualMachineArgs;
import com.pulumi.azure.devtest.inputs.WindowsVirtualMachineGalleryImageReferenceArgs;
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 exampleLab = new Lab("exampleLab", LabArgs.builder()
            .name("example-devtestlab")
            .location(example.location())
            .resourceGroupName(example.name())
            .tags(Map.of("Sydney", "Australia"))
            .build());

        var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
            .name("example-network")
            .labName(exampleLab.name())
            .resourceGroupName(example.name())
            .subnet(VirtualNetworkSubnetArgs.builder()
                .usePublicIpAddress("Allow")
                .useInVirtualMachineCreation("Allow")
                .build())
            .build());

        var exampleWindowsVirtualMachine = new WindowsVirtualMachine("exampleWindowsVirtualMachine", WindowsVirtualMachineArgs.builder()
            .name("example-vm03")
            .labName(exampleLab.name())
            .resourceGroupName(example.name())
            .location(example.location())
            .size("Standard_DS2")
            .username("exampleuser99")
            .password("Pa$w0rd1234!")
            .labVirtualNetworkId(exampleVirtualNetwork.id())
            .labSubnetName(exampleVirtualNetwork.subnet().applyValue(subnet -> subnet.name()))
            .storageType("Premium")
            .notes("Some notes about this Virtual Machine.")
            .galleryImageReference(WindowsVirtualMachineGalleryImageReferenceArgs.builder()
                .offer("WindowsServer")
                .publisher("MicrosoftWindowsServer")
                .sku("2019-Datacenter")
                .version("latest")
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleLab:
    type: azure:devtest:Lab
    name: example
    properties:
      name: example-devtestlab
      location: ${example.location}
      resourceGroupName: ${example.name}
      tags:
        Sydney: Australia
  exampleVirtualNetwork:
    type: azure:devtest:VirtualNetwork
    name: example
    properties:
      name: example-network
      labName: ${exampleLab.name}
      resourceGroupName: ${example.name}
      subnet:
        usePublicIpAddress: Allow
        useInVirtualMachineCreation: Allow
  exampleWindowsVirtualMachine:
    type: azure:devtest:WindowsVirtualMachine
    name: example
    properties:
      name: example-vm03
      labName: ${exampleLab.name}
      resourceGroupName: ${example.name}
      location: ${example.location}
      size: Standard_DS2
      username: exampleuser99
      password: Pa$w0rd1234!
      labVirtualNetworkId: ${exampleVirtualNetwork.id}
      labSubnetName: ${exampleVirtualNetwork.subnet.name}
      storageType: Premium
      notes: Some notes about this Virtual Machine.
      galleryImageReference:
        offer: WindowsServer
        publisher: MicrosoftWindowsServer
        sku: 2019-Datacenter
        version: latest
Copy

Create WindowsVirtualMachine Resource

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

Constructor syntax

new WindowsVirtualMachine(name: string, args: WindowsVirtualMachineArgs, opts?: CustomResourceOptions);
@overload
def WindowsVirtualMachine(resource_name: str,
                          args: WindowsVirtualMachineArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def WindowsVirtualMachine(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          size: Optional[str] = None,
                          password: Optional[str] = None,
                          gallery_image_reference: Optional[WindowsVirtualMachineGalleryImageReferenceArgs] = None,
                          username: Optional[str] = None,
                          lab_name: Optional[str] = None,
                          lab_subnet_name: Optional[str] = None,
                          storage_type: Optional[str] = None,
                          resource_group_name: Optional[str] = None,
                          lab_virtual_network_id: Optional[str] = None,
                          location: Optional[str] = None,
                          name: Optional[str] = None,
                          notes: Optional[str] = None,
                          allow_claim: Optional[bool] = None,
                          disallow_public_ip_address: Optional[bool] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          inbound_nat_rules: Optional[Sequence[WindowsVirtualMachineInboundNatRuleArgs]] = None)
func NewWindowsVirtualMachine(ctx *Context, name string, args WindowsVirtualMachineArgs, opts ...ResourceOption) (*WindowsVirtualMachine, error)
public WindowsVirtualMachine(string name, WindowsVirtualMachineArgs args, CustomResourceOptions? opts = null)
public WindowsVirtualMachine(String name, WindowsVirtualMachineArgs args)
public WindowsVirtualMachine(String name, WindowsVirtualMachineArgs args, CustomResourceOptions options)
type: azure:devtest:WindowsVirtualMachine
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

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

var azureWindowsVirtualMachineResource = new Azure.DevTest.WindowsVirtualMachine("azureWindowsVirtualMachineResource", new()
{
    Size = "string",
    Password = "string",
    GalleryImageReference = new Azure.DevTest.Inputs.WindowsVirtualMachineGalleryImageReferenceArgs
    {
        Offer = "string",
        Publisher = "string",
        Sku = "string",
        Version = "string",
    },
    Username = "string",
    LabName = "string",
    LabSubnetName = "string",
    StorageType = "string",
    ResourceGroupName = "string",
    LabVirtualNetworkId = "string",
    Location = "string",
    Name = "string",
    Notes = "string",
    AllowClaim = false,
    DisallowPublicIpAddress = false,
    Tags = 
    {
        { "string", "string" },
    },
    InboundNatRules = new[]
    {
        new Azure.DevTest.Inputs.WindowsVirtualMachineInboundNatRuleArgs
        {
            BackendPort = 0,
            Protocol = "string",
            FrontendPort = 0,
        },
    },
});
Copy
example, err := devtest.NewWindowsVirtualMachine(ctx, "azureWindowsVirtualMachineResource", &devtest.WindowsVirtualMachineArgs{
	Size:     pulumi.String("string"),
	Password: pulumi.String("string"),
	GalleryImageReference: &devtest.WindowsVirtualMachineGalleryImageReferenceArgs{
		Offer:     pulumi.String("string"),
		Publisher: pulumi.String("string"),
		Sku:       pulumi.String("string"),
		Version:   pulumi.String("string"),
	},
	Username:                pulumi.String("string"),
	LabName:                 pulumi.String("string"),
	LabSubnetName:           pulumi.String("string"),
	StorageType:             pulumi.String("string"),
	ResourceGroupName:       pulumi.String("string"),
	LabVirtualNetworkId:     pulumi.String("string"),
	Location:                pulumi.String("string"),
	Name:                    pulumi.String("string"),
	Notes:                   pulumi.String("string"),
	AllowClaim:              pulumi.Bool(false),
	DisallowPublicIpAddress: pulumi.Bool(false),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	InboundNatRules: devtest.WindowsVirtualMachineInboundNatRuleArray{
		&devtest.WindowsVirtualMachineInboundNatRuleArgs{
			BackendPort:  pulumi.Int(0),
			Protocol:     pulumi.String("string"),
			FrontendPort: pulumi.Int(0),
		},
	},
})
Copy
var azureWindowsVirtualMachineResource = new WindowsVirtualMachine("azureWindowsVirtualMachineResource", WindowsVirtualMachineArgs.builder()
    .size("string")
    .password("string")
    .galleryImageReference(WindowsVirtualMachineGalleryImageReferenceArgs.builder()
        .offer("string")
        .publisher("string")
        .sku("string")
        .version("string")
        .build())
    .username("string")
    .labName("string")
    .labSubnetName("string")
    .storageType("string")
    .resourceGroupName("string")
    .labVirtualNetworkId("string")
    .location("string")
    .name("string")
    .notes("string")
    .allowClaim(false)
    .disallowPublicIpAddress(false)
    .tags(Map.of("string", "string"))
    .inboundNatRules(WindowsVirtualMachineInboundNatRuleArgs.builder()
        .backendPort(0)
        .protocol("string")
        .frontendPort(0)
        .build())
    .build());
Copy
azure_windows_virtual_machine_resource = azure.devtest.WindowsVirtualMachine("azureWindowsVirtualMachineResource",
    size="string",
    password="string",
    gallery_image_reference={
        "offer": "string",
        "publisher": "string",
        "sku": "string",
        "version": "string",
    },
    username="string",
    lab_name="string",
    lab_subnet_name="string",
    storage_type="string",
    resource_group_name="string",
    lab_virtual_network_id="string",
    location="string",
    name="string",
    notes="string",
    allow_claim=False,
    disallow_public_ip_address=False,
    tags={
        "string": "string",
    },
    inbound_nat_rules=[{
        "backend_port": 0,
        "protocol": "string",
        "frontend_port": 0,
    }])
Copy
const azureWindowsVirtualMachineResource = new azure.devtest.WindowsVirtualMachine("azureWindowsVirtualMachineResource", {
    size: "string",
    password: "string",
    galleryImageReference: {
        offer: "string",
        publisher: "string",
        sku: "string",
        version: "string",
    },
    username: "string",
    labName: "string",
    labSubnetName: "string",
    storageType: "string",
    resourceGroupName: "string",
    labVirtualNetworkId: "string",
    location: "string",
    name: "string",
    notes: "string",
    allowClaim: false,
    disallowPublicIpAddress: false,
    tags: {
        string: "string",
    },
    inboundNatRules: [{
        backendPort: 0,
        protocol: "string",
        frontendPort: 0,
    }],
});
Copy
type: azure:devtest:WindowsVirtualMachine
properties:
    allowClaim: false
    disallowPublicIpAddress: false
    galleryImageReference:
        offer: string
        publisher: string
        sku: string
        version: string
    inboundNatRules:
        - backendPort: 0
          frontendPort: 0
          protocol: string
    labName: string
    labSubnetName: string
    labVirtualNetworkId: string
    location: string
    name: string
    notes: string
    password: string
    resourceGroupName: string
    size: string
    storageType: string
    tags:
        string: string
    username: string
Copy

WindowsVirtualMachine Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The WindowsVirtualMachine resource accepts the following input properties:

GalleryImageReference This property is required. WindowsVirtualMachineGalleryImageReference
A gallery_image_reference block as defined below.
LabName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabSubnetName
This property is required.
Changes to this property will trigger replacement.
string
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabVirtualNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
Password
This property is required.
Changes to this property will trigger replacement.
string
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
Size
This property is required.
Changes to this property will trigger replacement.
string
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
StorageType
This property is required.
Changes to this property will trigger replacement.
string
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
Username
This property is required.
Changes to this property will trigger replacement.
string
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
AllowClaim bool
Can this Virtual Machine be claimed by users? Defaults to true.
DisallowPublicIpAddress Changes to this property will trigger replacement. bool
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
InboundNatRules Changes to this property will trigger replacement. List<WindowsVirtualMachineInboundNatRule>

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

Location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

Notes string
Any notes about the Virtual Machine.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
GalleryImageReference This property is required. WindowsVirtualMachineGalleryImageReferenceArgs
A gallery_image_reference block as defined below.
LabName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabSubnetName
This property is required.
Changes to this property will trigger replacement.
string
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabVirtualNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
Password
This property is required.
Changes to this property will trigger replacement.
string
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
Size
This property is required.
Changes to this property will trigger replacement.
string
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
StorageType
This property is required.
Changes to this property will trigger replacement.
string
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
Username
This property is required.
Changes to this property will trigger replacement.
string
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
AllowClaim bool
Can this Virtual Machine be claimed by users? Defaults to true.
DisallowPublicIpAddress Changes to this property will trigger replacement. bool
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
InboundNatRules Changes to this property will trigger replacement. []WindowsVirtualMachineInboundNatRuleArgs

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

Location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

Notes string
Any notes about the Virtual Machine.
Tags map[string]string
A mapping of tags to assign to the resource.
galleryImageReference This property is required. WindowsVirtualMachineGalleryImageReference
A gallery_image_reference block as defined below.
labName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
labSubnetName
This property is required.
Changes to this property will trigger replacement.
String
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
labVirtualNetworkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
password
This property is required.
Changes to this property will trigger replacement.
String
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
size
This property is required.
Changes to this property will trigger replacement.
String
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
storageType
This property is required.
Changes to this property will trigger replacement.
String
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
username
This property is required.
Changes to this property will trigger replacement.
String
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
allowClaim Boolean
Can this Virtual Machine be claimed by users? Defaults to true.
disallowPublicIpAddress Changes to this property will trigger replacement. Boolean
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
inboundNatRules Changes to this property will trigger replacement. List<WindowsVirtualMachineInboundNatRule>

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

location Changes to this property will trigger replacement. String
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

notes String
Any notes about the Virtual Machine.
tags Map<String,String>
A mapping of tags to assign to the resource.
galleryImageReference This property is required. WindowsVirtualMachineGalleryImageReference
A gallery_image_reference block as defined below.
labName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
labSubnetName
This property is required.
Changes to this property will trigger replacement.
string
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
labVirtualNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
password
This property is required.
Changes to this property will trigger replacement.
string
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
size
This property is required.
Changes to this property will trigger replacement.
string
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
storageType
This property is required.
Changes to this property will trigger replacement.
string
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
username
This property is required.
Changes to this property will trigger replacement.
string
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
allowClaim boolean
Can this Virtual Machine be claimed by users? Defaults to true.
disallowPublicIpAddress Changes to this property will trigger replacement. boolean
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
inboundNatRules Changes to this property will trigger replacement. WindowsVirtualMachineInboundNatRule[]

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

notes string
Any notes about the Virtual Machine.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
gallery_image_reference This property is required. WindowsVirtualMachineGalleryImageReferenceArgs
A gallery_image_reference block as defined below.
lab_name
This property is required.
Changes to this property will trigger replacement.
str
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
lab_subnet_name
This property is required.
Changes to this property will trigger replacement.
str
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
lab_virtual_network_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
password
This property is required.
Changes to this property will trigger replacement.
str
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
size
This property is required.
Changes to this property will trigger replacement.
str
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
storage_type
This property is required.
Changes to this property will trigger replacement.
str
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
username
This property is required.
Changes to this property will trigger replacement.
str
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
allow_claim bool
Can this Virtual Machine be claimed by users? Defaults to true.
disallow_public_ip_address Changes to this property will trigger replacement. bool
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
inbound_nat_rules Changes to this property will trigger replacement. Sequence[WindowsVirtualMachineInboundNatRuleArgs]

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

location Changes to this property will trigger replacement. str
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

notes str
Any notes about the Virtual Machine.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
galleryImageReference This property is required. Property Map
A gallery_image_reference block as defined below.
labName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
labSubnetName
This property is required.
Changes to this property will trigger replacement.
String
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
labVirtualNetworkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
password
This property is required.
Changes to this property will trigger replacement.
String
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
size
This property is required.
Changes to this property will trigger replacement.
String
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
storageType
This property is required.
Changes to this property will trigger replacement.
String
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
username
This property is required.
Changes to this property will trigger replacement.
String
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
allowClaim Boolean
Can this Virtual Machine be claimed by users? Defaults to true.
disallowPublicIpAddress Changes to this property will trigger replacement. Boolean
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
inboundNatRules Changes to this property will trigger replacement. List<Property Map>

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

location Changes to this property will trigger replacement. String
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

notes String
Any notes about the Virtual Machine.
tags Map<String>
A mapping of tags to assign to the resource.

Outputs

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

Fqdn string
The FQDN of the Virtual Machine.
Id string
The provider-assigned unique ID for this managed resource.
UniqueIdentifier string
The unique immutable identifier of the Virtual Machine.
Fqdn string
The FQDN of the Virtual Machine.
Id string
The provider-assigned unique ID for this managed resource.
UniqueIdentifier string
The unique immutable identifier of the Virtual Machine.
fqdn String
The FQDN of the Virtual Machine.
id String
The provider-assigned unique ID for this managed resource.
uniqueIdentifier String
The unique immutable identifier of the Virtual Machine.
fqdn string
The FQDN of the Virtual Machine.
id string
The provider-assigned unique ID for this managed resource.
uniqueIdentifier string
The unique immutable identifier of the Virtual Machine.
fqdn str
The FQDN of the Virtual Machine.
id str
The provider-assigned unique ID for this managed resource.
unique_identifier str
The unique immutable identifier of the Virtual Machine.
fqdn String
The FQDN of the Virtual Machine.
id String
The provider-assigned unique ID for this managed resource.
uniqueIdentifier String
The unique immutable identifier of the Virtual Machine.

Look up Existing WindowsVirtualMachine Resource

Get an existing WindowsVirtualMachine 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?: WindowsVirtualMachineState, opts?: CustomResourceOptions): WindowsVirtualMachine
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_claim: Optional[bool] = None,
        disallow_public_ip_address: Optional[bool] = None,
        fqdn: Optional[str] = None,
        gallery_image_reference: Optional[WindowsVirtualMachineGalleryImageReferenceArgs] = None,
        inbound_nat_rules: Optional[Sequence[WindowsVirtualMachineInboundNatRuleArgs]] = None,
        lab_name: Optional[str] = None,
        lab_subnet_name: Optional[str] = None,
        lab_virtual_network_id: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        notes: Optional[str] = None,
        password: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        size: Optional[str] = None,
        storage_type: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        unique_identifier: Optional[str] = None,
        username: Optional[str] = None) -> WindowsVirtualMachine
func GetWindowsVirtualMachine(ctx *Context, name string, id IDInput, state *WindowsVirtualMachineState, opts ...ResourceOption) (*WindowsVirtualMachine, error)
public static WindowsVirtualMachine Get(string name, Input<string> id, WindowsVirtualMachineState? state, CustomResourceOptions? opts = null)
public static WindowsVirtualMachine get(String name, Output<String> id, WindowsVirtualMachineState state, CustomResourceOptions options)
resources:  _:    type: azure:devtest:WindowsVirtualMachine    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AllowClaim bool
Can this Virtual Machine be claimed by users? Defaults to true.
DisallowPublicIpAddress Changes to this property will trigger replacement. bool
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
Fqdn string
The FQDN of the Virtual Machine.
GalleryImageReference WindowsVirtualMachineGalleryImageReference
A gallery_image_reference block as defined below.
InboundNatRules Changes to this property will trigger replacement. List<WindowsVirtualMachineInboundNatRule>

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

LabName Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabSubnetName Changes to this property will trigger replacement. string
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabVirtualNetworkId Changes to this property will trigger replacement. string
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
Location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

Notes string
Any notes about the Virtual Machine.
Password Changes to this property will trigger replacement. string
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
Size Changes to this property will trigger replacement. string
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
StorageType Changes to this property will trigger replacement. string
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
UniqueIdentifier string
The unique immutable identifier of the Virtual Machine.
Username Changes to this property will trigger replacement. string
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
AllowClaim bool
Can this Virtual Machine be claimed by users? Defaults to true.
DisallowPublicIpAddress Changes to this property will trigger replacement. bool
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
Fqdn string
The FQDN of the Virtual Machine.
GalleryImageReference WindowsVirtualMachineGalleryImageReferenceArgs
A gallery_image_reference block as defined below.
InboundNatRules Changes to this property will trigger replacement. []WindowsVirtualMachineInboundNatRuleArgs

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

LabName Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabSubnetName Changes to this property will trigger replacement. string
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabVirtualNetworkId Changes to this property will trigger replacement. string
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
Location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

Notes string
Any notes about the Virtual Machine.
Password Changes to this property will trigger replacement. string
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
Size Changes to this property will trigger replacement. string
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
StorageType Changes to this property will trigger replacement. string
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
Tags map[string]string
A mapping of tags to assign to the resource.
UniqueIdentifier string
The unique immutable identifier of the Virtual Machine.
Username Changes to this property will trigger replacement. string
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
allowClaim Boolean
Can this Virtual Machine be claimed by users? Defaults to true.
disallowPublicIpAddress Changes to this property will trigger replacement. Boolean
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
fqdn String
The FQDN of the Virtual Machine.
galleryImageReference WindowsVirtualMachineGalleryImageReference
A gallery_image_reference block as defined below.
inboundNatRules Changes to this property will trigger replacement. List<WindowsVirtualMachineInboundNatRule>

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

labName Changes to this property will trigger replacement. String
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
labSubnetName Changes to this property will trigger replacement. String
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
labVirtualNetworkId Changes to this property will trigger replacement. String
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
location Changes to this property will trigger replacement. String
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

notes String
Any notes about the Virtual Machine.
password Changes to this property will trigger replacement. String
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
size Changes to this property will trigger replacement. String
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
storageType Changes to this property will trigger replacement. String
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
tags Map<String,String>
A mapping of tags to assign to the resource.
uniqueIdentifier String
The unique immutable identifier of the Virtual Machine.
username Changes to this property will trigger replacement. String
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
allowClaim boolean
Can this Virtual Machine be claimed by users? Defaults to true.
disallowPublicIpAddress Changes to this property will trigger replacement. boolean
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
fqdn string
The FQDN of the Virtual Machine.
galleryImageReference WindowsVirtualMachineGalleryImageReference
A gallery_image_reference block as defined below.
inboundNatRules Changes to this property will trigger replacement. WindowsVirtualMachineInboundNatRule[]

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

labName Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
labSubnetName Changes to this property will trigger replacement. string
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
labVirtualNetworkId Changes to this property will trigger replacement. string
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

notes string
Any notes about the Virtual Machine.
password Changes to this property will trigger replacement. string
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
size Changes to this property will trigger replacement. string
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
storageType Changes to this property will trigger replacement. string
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
uniqueIdentifier string
The unique immutable identifier of the Virtual Machine.
username Changes to this property will trigger replacement. string
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
allow_claim bool
Can this Virtual Machine be claimed by users? Defaults to true.
disallow_public_ip_address Changes to this property will trigger replacement. bool
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
fqdn str
The FQDN of the Virtual Machine.
gallery_image_reference WindowsVirtualMachineGalleryImageReferenceArgs
A gallery_image_reference block as defined below.
inbound_nat_rules Changes to this property will trigger replacement. Sequence[WindowsVirtualMachineInboundNatRuleArgs]

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

lab_name Changes to this property will trigger replacement. str
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
lab_subnet_name Changes to this property will trigger replacement. str
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
lab_virtual_network_id Changes to this property will trigger replacement. str
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
location Changes to this property will trigger replacement. str
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

notes str
Any notes about the Virtual Machine.
password Changes to this property will trigger replacement. str
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
resource_group_name Changes to this property will trigger replacement. str
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
size Changes to this property will trigger replacement. str
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
storage_type Changes to this property will trigger replacement. str
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
unique_identifier str
The unique immutable identifier of the Virtual Machine.
username Changes to this property will trigger replacement. str
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
allowClaim Boolean
Can this Virtual Machine be claimed by users? Defaults to true.
disallowPublicIpAddress Changes to this property will trigger replacement. Boolean
Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
fqdn String
The FQDN of the Virtual Machine.
galleryImageReference Property Map
A gallery_image_reference block as defined below.
inboundNatRules Changes to this property will trigger replacement. List<Property Map>

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

NOTE: If any inbound_nat_rule blocks are specified then disallow_public_ip_address must be set to true.

labName Changes to this property will trigger replacement. String
Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
labSubnetName Changes to this property will trigger replacement. String
The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
labVirtualNetworkId Changes to this property will trigger replacement. String
The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
location Changes to this property will trigger replacement. String
Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

NOTE: The validation requirements for the Name change based on the os_type used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.

notes String
Any notes about the Virtual Machine.
password Changes to this property will trigger replacement. String
The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
size Changes to this property will trigger replacement. String
The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.
storageType Changes to this property will trigger replacement. String
The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium. Changing this forces a new resource to be created.
tags Map<String>
A mapping of tags to assign to the resource.
uniqueIdentifier String
The unique immutable identifier of the Virtual Machine.
username Changes to this property will trigger replacement. String
The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.

Supporting Types

WindowsVirtualMachineGalleryImageReference
, WindowsVirtualMachineGalleryImageReferenceArgs

Offer
This property is required.
Changes to this property will trigger replacement.
string
The Offer of the Gallery Image. Changing this forces a new resource to be created.
Publisher
This property is required.
Changes to this property will trigger replacement.
string
The Publisher of the Gallery Image. Changing this forces a new resource to be created.
Sku
This property is required.
Changes to this property will trigger replacement.
string
The SKU of the Gallery Image. Changing this forces a new resource to be created.
Version
This property is required.
Changes to this property will trigger replacement.
string
The Version of the Gallery Image. Changing this forces a new resource to be created.
Offer
This property is required.
Changes to this property will trigger replacement.
string
The Offer of the Gallery Image. Changing this forces a new resource to be created.
Publisher
This property is required.
Changes to this property will trigger replacement.
string
The Publisher of the Gallery Image. Changing this forces a new resource to be created.
Sku
This property is required.
Changes to this property will trigger replacement.
string
The SKU of the Gallery Image. Changing this forces a new resource to be created.
Version
This property is required.
Changes to this property will trigger replacement.
string
The Version of the Gallery Image. Changing this forces a new resource to be created.
offer
This property is required.
Changes to this property will trigger replacement.
String
The Offer of the Gallery Image. Changing this forces a new resource to be created.
publisher
This property is required.
Changes to this property will trigger replacement.
String
The Publisher of the Gallery Image. Changing this forces a new resource to be created.
sku
This property is required.
Changes to this property will trigger replacement.
String
The SKU of the Gallery Image. Changing this forces a new resource to be created.
version
This property is required.
Changes to this property will trigger replacement.
String
The Version of the Gallery Image. Changing this forces a new resource to be created.
offer
This property is required.
Changes to this property will trigger replacement.
string
The Offer of the Gallery Image. Changing this forces a new resource to be created.
publisher
This property is required.
Changes to this property will trigger replacement.
string
The Publisher of the Gallery Image. Changing this forces a new resource to be created.
sku
This property is required.
Changes to this property will trigger replacement.
string
The SKU of the Gallery Image. Changing this forces a new resource to be created.
version
This property is required.
Changes to this property will trigger replacement.
string
The Version of the Gallery Image. Changing this forces a new resource to be created.
offer
This property is required.
Changes to this property will trigger replacement.
str
The Offer of the Gallery Image. Changing this forces a new resource to be created.
publisher
This property is required.
Changes to this property will trigger replacement.
str
The Publisher of the Gallery Image. Changing this forces a new resource to be created.
sku
This property is required.
Changes to this property will trigger replacement.
str
The SKU of the Gallery Image. Changing this forces a new resource to be created.
version
This property is required.
Changes to this property will trigger replacement.
str
The Version of the Gallery Image. Changing this forces a new resource to be created.
offer
This property is required.
Changes to this property will trigger replacement.
String
The Offer of the Gallery Image. Changing this forces a new resource to be created.
publisher
This property is required.
Changes to this property will trigger replacement.
String
The Publisher of the Gallery Image. Changing this forces a new resource to be created.
sku
This property is required.
Changes to this property will trigger replacement.
String
The SKU of the Gallery Image. Changing this forces a new resource to be created.
version
This property is required.
Changes to this property will trigger replacement.
String
The Version of the Gallery Image. Changing this forces a new resource to be created.

WindowsVirtualMachineInboundNatRule
, WindowsVirtualMachineInboundNatRuleArgs

BackendPort
This property is required.
Changes to this property will trigger replacement.
int
The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.
Protocol This property is required. string
The Protocol used for this NAT Rule. Possible values are Tcp and Udp.
FrontendPort int
The frontend port associated with this Inbound NAT Rule.
BackendPort
This property is required.
Changes to this property will trigger replacement.
int
The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.
Protocol This property is required. string
The Protocol used for this NAT Rule. Possible values are Tcp and Udp.
FrontendPort int
The frontend port associated with this Inbound NAT Rule.
backendPort
This property is required.
Changes to this property will trigger replacement.
Integer
The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.
protocol This property is required. String
The Protocol used for this NAT Rule. Possible values are Tcp and Udp.
frontendPort Integer
The frontend port associated with this Inbound NAT Rule.
backendPort
This property is required.
Changes to this property will trigger replacement.
number
The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.
protocol This property is required. string
The Protocol used for this NAT Rule. Possible values are Tcp and Udp.
frontendPort number
The frontend port associated with this Inbound NAT Rule.
backend_port
This property is required.
Changes to this property will trigger replacement.
int
The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.
protocol This property is required. str
The Protocol used for this NAT Rule. Possible values are Tcp and Udp.
frontend_port int
The frontend port associated with this Inbound NAT Rule.
backendPort
This property is required.
Changes to this property will trigger replacement.
Number
The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.
protocol This property is required. String
The Protocol used for this NAT Rule. Possible values are Tcp and Udp.
frontendPort Number
The frontend port associated with this Inbound NAT Rule.

Import

DevTest Windows Virtual Machines can be imported using the resource id, e.g.

$ pulumi import azure:devtest/windowsVirtualMachine:WindowsVirtualMachine machine1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/virtualMachines/machine1
Copy

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.