azure logo
Azure Classic v5.43.0, May 6 23

azure.compute.VirtualMachine

Explore with Pulumi AI

Manages a Virtual Machine.

Disclaimers

Note: The azure.compute.VirtualMachine resource has been superseded by the azure.compute.LinuxVirtualMachine and azure.compute.WindowsVirtualMachine resources. The existing azure.compute.VirtualMachine resource will continue to be available throughout the 2.x releases however is in a feature-frozen state to maintain compatibility - new functionality will instead be added to the azure.compute.LinuxVirtualMachine and azure.compute.WindowsVirtualMachine resources.

Note: Data Disks can be attached either directly on the azure.compute.VirtualMachine resource, or using the azure.compute.DataDiskAttachment resource - but the two cannot be used together. If both are used against the same Virtual Machine, spurious changes will occur.

Example Usage

From An Azure Platform Image)

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var prefix = config.Get("prefix") ?? "tfvmex";
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Location = "West Europe",
    });

    var mainVirtualNetwork = new Azure.Network.VirtualNetwork("mainVirtualNetwork", new()
    {
        AddressSpaces = new[]
        {
            "10.0.0.0/16",
        },
        Location = example.Location,
        ResourceGroupName = example.Name,
    });

    var @internal = new Azure.Network.Subnet("internal", new()
    {
        ResourceGroupName = example.Name,
        VirtualNetworkName = mainVirtualNetwork.Name,
        AddressPrefixes = new[]
        {
            "10.0.2.0/24",
        },
    });

    var mainNetworkInterface = new Azure.Network.NetworkInterface("mainNetworkInterface", new()
    {
        Location = example.Location,
        ResourceGroupName = example.Name,
        IpConfigurations = new[]
        {
            new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
            {
                Name = "testconfiguration1",
                SubnetId = @internal.Id,
                PrivateIpAddressAllocation = "Dynamic",
            },
        },
    });

    var mainVirtualMachine = new Azure.Compute.VirtualMachine("mainVirtualMachine", new()
    {
        Location = example.Location,
        ResourceGroupName = example.Name,
        NetworkInterfaceIds = new[]
        {
            mainNetworkInterface.Id,
        },
        VmSize = "Standard_DS1_v2",
        StorageImageReference = new Azure.Compute.Inputs.VirtualMachineStorageImageReferenceArgs
        {
            Publisher = "Canonical",
            Offer = "UbuntuServer",
            Sku = "16.04-LTS",
            Version = "latest",
        },
        StorageOsDisk = new Azure.Compute.Inputs.VirtualMachineStorageOsDiskArgs
        {
            Name = "myosdisk1",
            Caching = "ReadWrite",
            CreateOption = "FromImage",
            ManagedDiskType = "Standard_LRS",
        },
        OsProfile = new Azure.Compute.Inputs.VirtualMachineOsProfileArgs
        {
            ComputerName = "hostname",
            AdminUsername = "testadmin",
            AdminPassword = "Password1234!",
        },
        OsProfileLinuxConfig = new Azure.Compute.Inputs.VirtualMachineOsProfileLinuxConfigArgs
        {
            DisablePasswordAuthentication = false,
        },
        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/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		prefix := "tfvmex"
		if param := cfg.Get("prefix"); param != "" {
			prefix = param
		}
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		mainVirtualNetwork, err := network.NewVirtualNetwork(ctx, "mainVirtualNetwork", &network.VirtualNetworkArgs{
			AddressSpaces: pulumi.StringArray{
				pulumi.String("10.0.0.0/16"),
			},
			Location:          example.Location,
			ResourceGroupName: example.Name,
		})
		if err != nil {
			return err
		}
		internal, err := network.NewSubnet(ctx, "internal", &network.SubnetArgs{
			ResourceGroupName:  example.Name,
			VirtualNetworkName: mainVirtualNetwork.Name,
			AddressPrefixes: pulumi.StringArray{
				pulumi.String("10.0.2.0/24"),
			},
		})
		if err != nil {
			return err
		}
		mainNetworkInterface, err := network.NewNetworkInterface(ctx, "mainNetworkInterface", &network.NetworkInterfaceArgs{
			Location:          example.Location,
			ResourceGroupName: example.Name,
			IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
				&network.NetworkInterfaceIpConfigurationArgs{
					Name:                       pulumi.String("testconfiguration1"),
					SubnetId:                   internal.ID(),
					PrivateIpAddressAllocation: pulumi.String("Dynamic"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = compute.NewVirtualMachine(ctx, "mainVirtualMachine", &compute.VirtualMachineArgs{
			Location:          example.Location,
			ResourceGroupName: example.Name,
			NetworkInterfaceIds: pulumi.StringArray{
				mainNetworkInterface.ID(),
			},
			VmSize: pulumi.String("Standard_DS1_v2"),
			StorageImageReference: &compute.VirtualMachineStorageImageReferenceArgs{
				Publisher: pulumi.String("Canonical"),
				Offer:     pulumi.String("UbuntuServer"),
				Sku:       pulumi.String("16.04-LTS"),
				Version:   pulumi.String("latest"),
			},
			StorageOsDisk: &compute.VirtualMachineStorageOsDiskArgs{
				Name:            pulumi.String("myosdisk1"),
				Caching:         pulumi.String("ReadWrite"),
				CreateOption:    pulumi.String("FromImage"),
				ManagedDiskType: pulumi.String("Standard_LRS"),
			},
			OsProfile: &compute.VirtualMachineOsProfileArgs{
				ComputerName:  pulumi.String("hostname"),
				AdminUsername: pulumi.String("testadmin"),
				AdminPassword: pulumi.String("Password1234!"),
			},
			OsProfileLinuxConfig: &compute.VirtualMachineOsProfileLinuxConfigArgs{
				DisablePasswordAuthentication: pulumi.Bool(false),
			},
			Tags: pulumi.StringMap{
				"environment": pulumi.String("staging"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.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.NetworkInterface;
import com.pulumi.azure.network.NetworkInterfaceArgs;
import com.pulumi.azure.network.inputs.NetworkInterfaceIpConfigurationArgs;
import com.pulumi.azure.compute.VirtualMachine;
import com.pulumi.azure.compute.VirtualMachineArgs;
import com.pulumi.azure.compute.inputs.VirtualMachineStorageImageReferenceArgs;
import com.pulumi.azure.compute.inputs.VirtualMachineStorageOsDiskArgs;
import com.pulumi.azure.compute.inputs.VirtualMachineOsProfileArgs;
import com.pulumi.azure.compute.inputs.VirtualMachineOsProfileLinuxConfigArgs;
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) {
        final var config = ctx.config();
        final var prefix = config.get("prefix").orElse("tfvmex");
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var mainVirtualNetwork = new VirtualNetwork("mainVirtualNetwork", VirtualNetworkArgs.builder()        
            .addressSpaces("10.0.0.0/16")
            .location(example.location())
            .resourceGroupName(example.name())
            .build());

        var internal = new Subnet("internal", SubnetArgs.builder()        
            .resourceGroupName(example.name())
            .virtualNetworkName(mainVirtualNetwork.name())
            .addressPrefixes("10.0.2.0/24")
            .build());

        var mainNetworkInterface = new NetworkInterface("mainNetworkInterface", NetworkInterfaceArgs.builder()        
            .location(example.location())
            .resourceGroupName(example.name())
            .ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
                .name("testconfiguration1")
                .subnetId(internal.id())
                .privateIpAddressAllocation("Dynamic")
                .build())
            .build());

        var mainVirtualMachine = new VirtualMachine("mainVirtualMachine", VirtualMachineArgs.builder()        
            .location(example.location())
            .resourceGroupName(example.name())
            .networkInterfaceIds(mainNetworkInterface.id())
            .vmSize("Standard_DS1_v2")
            .storageImageReference(VirtualMachineStorageImageReferenceArgs.builder()
                .publisher("Canonical")
                .offer("UbuntuServer")
                .sku("16.04-LTS")
                .version("latest")
                .build())
            .storageOsDisk(VirtualMachineStorageOsDiskArgs.builder()
                .name("myosdisk1")
                .caching("ReadWrite")
                .createOption("FromImage")
                .managedDiskType("Standard_LRS")
                .build())
            .osProfile(VirtualMachineOsProfileArgs.builder()
                .computerName("hostname")
                .adminUsername("testadmin")
                .adminPassword("Password1234!")
                .build())
            .osProfileLinuxConfig(VirtualMachineOsProfileLinuxConfigArgs.builder()
                .disablePasswordAuthentication(false)
                .build())
            .tags(Map.of("environment", "staging"))
            .build());

    }
}
import pulumi
import pulumi_azure as azure

config = pulumi.Config()
prefix = config.get("prefix")
if prefix is None:
    prefix = "tfvmex"
example = azure.core.ResourceGroup("example", location="West Europe")
main_virtual_network = azure.network.VirtualNetwork("mainVirtualNetwork",
    address_spaces=["10.0.0.0/16"],
    location=example.location,
    resource_group_name=example.name)
internal = azure.network.Subnet("internal",
    resource_group_name=example.name,
    virtual_network_name=main_virtual_network.name,
    address_prefixes=["10.0.2.0/24"])
main_network_interface = azure.network.NetworkInterface("mainNetworkInterface",
    location=example.location,
    resource_group_name=example.name,
    ip_configurations=[azure.network.NetworkInterfaceIpConfigurationArgs(
        name="testconfiguration1",
        subnet_id=internal.id,
        private_ip_address_allocation="Dynamic",
    )])
main_virtual_machine = azure.compute.VirtualMachine("mainVirtualMachine",
    location=example.location,
    resource_group_name=example.name,
    network_interface_ids=[main_network_interface.id],
    vm_size="Standard_DS1_v2",
    storage_image_reference=azure.compute.VirtualMachineStorageImageReferenceArgs(
        publisher="Canonical",
        offer="UbuntuServer",
        sku="16.04-LTS",
        version="latest",
    ),
    storage_os_disk=azure.compute.VirtualMachineStorageOsDiskArgs(
        name="myosdisk1",
        caching="ReadWrite",
        create_option="FromImage",
        managed_disk_type="Standard_LRS",
    ),
    os_profile=azure.compute.VirtualMachineOsProfileArgs(
        computer_name="hostname",
        admin_username="testadmin",
        admin_password="Password1234!",
    ),
    os_profile_linux_config=azure.compute.VirtualMachineOsProfileLinuxConfigArgs(
        disable_password_authentication=False,
    ),
    tags={
        "environment": "staging",
    })
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const config = new pulumi.Config();
const prefix = config.get("prefix") || "tfvmex";
const example = new azure.core.ResourceGroup("example", {location: "West Europe"});
const mainVirtualNetwork = new azure.network.VirtualNetwork("mainVirtualNetwork", {
    addressSpaces: ["10.0.0.0/16"],
    location: example.location,
    resourceGroupName: example.name,
});
const internal = new azure.network.Subnet("internal", {
    resourceGroupName: example.name,
    virtualNetworkName: mainVirtualNetwork.name,
    addressPrefixes: ["10.0.2.0/24"],
});
const mainNetworkInterface = new azure.network.NetworkInterface("mainNetworkInterface", {
    location: example.location,
    resourceGroupName: example.name,
    ipConfigurations: [{
        name: "testconfiguration1",
        subnetId: internal.id,
        privateIpAddressAllocation: "Dynamic",
    }],
});
const mainVirtualMachine = new azure.compute.VirtualMachine("mainVirtualMachine", {
    location: example.location,
    resourceGroupName: example.name,
    networkInterfaceIds: [mainNetworkInterface.id],
    vmSize: "Standard_DS1_v2",
    storageImageReference: {
        publisher: "Canonical",
        offer: "UbuntuServer",
        sku: "16.04-LTS",
        version: "latest",
    },
    storageOsDisk: {
        name: "myosdisk1",
        caching: "ReadWrite",
        createOption: "FromImage",
        managedDiskType: "Standard_LRS",
    },
    osProfile: {
        computerName: "hostname",
        adminUsername: "testadmin",
        adminPassword: "Password1234!",
    },
    osProfileLinuxConfig: {
        disablePasswordAuthentication: false,
    },
    tags: {
        environment: "staging",
    },
});
configuration:
  prefix:
    type: string
    default: tfvmex
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  mainVirtualNetwork:
    type: azure:network:VirtualNetwork
    properties:
      addressSpaces:
        - 10.0.0.0/16
      location: ${example.location}
      resourceGroupName: ${example.name}
  internal:
    type: azure:network:Subnet
    properties:
      resourceGroupName: ${example.name}
      virtualNetworkName: ${mainVirtualNetwork.name}
      addressPrefixes:
        - 10.0.2.0/24
  mainNetworkInterface:
    type: azure:network:NetworkInterface
    properties:
      location: ${example.location}
      resourceGroupName: ${example.name}
      ipConfigurations:
        - name: testconfiguration1
          subnetId: ${internal.id}
          privateIpAddressAllocation: Dynamic
  mainVirtualMachine:
    type: azure:compute:VirtualMachine
    properties:
      location: ${example.location}
      resourceGroupName: ${example.name}
      networkInterfaceIds:
        - ${mainNetworkInterface.id}
      vmSize: Standard_DS1_v2 # Uncomment this line to delete the data disks automatically when deleting the VM
      #   # delete_data_disks_on_termination = true
      storageImageReference:
        publisher: Canonical
        offer: UbuntuServer
        sku: 16.04-LTS
        version: latest
      storageOsDisk:
        name: myosdisk1
        caching: ReadWrite
        createOption: FromImage
        managedDiskType: Standard_LRS
      osProfile:
        computerName: hostname
        adminUsername: testadmin
        adminPassword: Password1234!
      osProfileLinuxConfig:
        disablePasswordAuthentication: false
      tags:
        environment: staging

Create VirtualMachine Resource

new VirtualMachine(name: string, args: VirtualMachineArgs, opts?: CustomResourceOptions);
@overload
def VirtualMachine(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   additional_capabilities: Optional[VirtualMachineAdditionalCapabilitiesArgs] = None,
                   availability_set_id: Optional[str] = None,
                   boot_diagnostics: Optional[VirtualMachineBootDiagnosticsArgs] = None,
                   delete_data_disks_on_termination: Optional[bool] = None,
                   delete_os_disk_on_termination: Optional[bool] = None,
                   identity: Optional[VirtualMachineIdentityArgs] = None,
                   license_type: Optional[str] = None,
                   location: Optional[str] = None,
                   name: Optional[str] = None,
                   network_interface_ids: Optional[Sequence[str]] = None,
                   os_profile: Optional[VirtualMachineOsProfileArgs] = None,
                   os_profile_linux_config: Optional[VirtualMachineOsProfileLinuxConfigArgs] = None,
                   os_profile_secrets: Optional[Sequence[VirtualMachineOsProfileSecretArgs]] = None,
                   os_profile_windows_config: Optional[VirtualMachineOsProfileWindowsConfigArgs] = None,
                   plan: Optional[VirtualMachinePlanArgs] = None,
                   primary_network_interface_id: Optional[str] = None,
                   proximity_placement_group_id: Optional[str] = None,
                   resource_group_name: Optional[str] = None,
                   storage_data_disks: Optional[Sequence[VirtualMachineStorageDataDiskArgs]] = None,
                   storage_image_reference: Optional[VirtualMachineStorageImageReferenceArgs] = None,
                   storage_os_disk: Optional[VirtualMachineStorageOsDiskArgs] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   vm_size: Optional[str] = None,
                   zones: Optional[str] = None)
@overload
def VirtualMachine(resource_name: str,
                   args: VirtualMachineArgs,
                   opts: Optional[ResourceOptions] = None)
func NewVirtualMachine(ctx *Context, name string, args VirtualMachineArgs, opts ...ResourceOption) (*VirtualMachine, error)
public VirtualMachine(string name, VirtualMachineArgs args, CustomResourceOptions? opts = null)
public VirtualMachine(String name, VirtualMachineArgs args)
public VirtualMachine(String name, VirtualMachineArgs args, CustomResourceOptions options)
type: azure:compute:VirtualMachine
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args VirtualMachineArgs
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 VirtualMachineArgs
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 VirtualMachineArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VirtualMachineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args VirtualMachineArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

VirtualMachine 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 VirtualMachine resource accepts the following input properties:

NetworkInterfaceIds List<string>

A list of Network Interface IDs which should be associated with the Virtual Machine.

ResourceGroupName string

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

StorageOsDisk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

VmSize string

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

AdditionalCapabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

AvailabilitySetId string

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

BootDiagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

DeleteDataDisksOnTermination bool

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

DeleteOsDiskOnTermination bool

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

Identity VirtualMachineIdentityArgs

An identity block as defined below.

LicenseType string

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

Location string

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

Name string

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

OsProfile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

OsProfileLinuxConfig VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

OsProfileSecrets List<VirtualMachineOsProfileSecretArgs>

One or more os_profile_secrets blocks as defined below.

OsProfileWindowsConfig VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

Plan VirtualMachinePlanArgs

A plan block as defined below.

PrimaryNetworkInterfaceId string

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

StorageDataDisks List<VirtualMachineStorageDataDiskArgs>

One or more storage_data_disk blocks as defined below.

StorageImageReference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

Tags Dictionary<string, string>

A mapping of tags to assign to the Virtual Machine.

Zones string

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

NetworkInterfaceIds []string

A list of Network Interface IDs which should be associated with the Virtual Machine.

ResourceGroupName string

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

StorageOsDisk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

VmSize string

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

AdditionalCapabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

AvailabilitySetId string

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

BootDiagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

DeleteDataDisksOnTermination bool

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

DeleteOsDiskOnTermination bool

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

Identity VirtualMachineIdentityArgs

An identity block as defined below.

LicenseType string

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

Location string

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

Name string

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

OsProfile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

OsProfileLinuxConfig VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

OsProfileSecrets []VirtualMachineOsProfileSecretArgs

One or more os_profile_secrets blocks as defined below.

OsProfileWindowsConfig VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

Plan VirtualMachinePlanArgs

A plan block as defined below.

PrimaryNetworkInterfaceId string

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

StorageDataDisks []VirtualMachineStorageDataDiskArgs

One or more storage_data_disk blocks as defined below.

StorageImageReference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

Tags map[string]string

A mapping of tags to assign to the Virtual Machine.

Zones string

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

networkInterfaceIds List<String>

A list of Network Interface IDs which should be associated with the Virtual Machine.

resourceGroupName String

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

storageOsDisk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

vmSize String

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

additionalCapabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

availabilitySetId String

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

bootDiagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

deleteDataDisksOnTermination Boolean

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

deleteOsDiskOnTermination Boolean

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

identity VirtualMachineIdentityArgs

An identity block as defined below.

licenseType String

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

location String

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

name String

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

osProfile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

osProfileLinuxConfig VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

osProfileSecrets List<VirtualMachineOsProfileSecretArgs>

One or more os_profile_secrets blocks as defined below.

osProfileWindowsConfig VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

plan VirtualMachinePlanArgs

A plan block as defined below.

primaryNetworkInterfaceId String

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

storageDataDisks List<VirtualMachineStorageDataDiskArgs>

One or more storage_data_disk blocks as defined below.

storageImageReference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

tags Map<String,String>

A mapping of tags to assign to the Virtual Machine.

zones String

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

networkInterfaceIds string[]

A list of Network Interface IDs which should be associated with the Virtual Machine.

resourceGroupName string

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

storageOsDisk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

vmSize string

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

additionalCapabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

availabilitySetId string

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

bootDiagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

deleteDataDisksOnTermination boolean

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

deleteOsDiskOnTermination boolean

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

identity VirtualMachineIdentityArgs

An identity block as defined below.

licenseType string

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

location string

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

name string

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

osProfile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

osProfileLinuxConfig VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

osProfileSecrets VirtualMachineOsProfileSecretArgs[]

One or more os_profile_secrets blocks as defined below.

osProfileWindowsConfig VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

plan VirtualMachinePlanArgs

A plan block as defined below.

primaryNetworkInterfaceId string

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

storageDataDisks VirtualMachineStorageDataDiskArgs[]

One or more storage_data_disk blocks as defined below.

storageImageReference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

tags {[key: string]: string}

A mapping of tags to assign to the Virtual Machine.

zones string

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

network_interface_ids Sequence[str]

A list of Network Interface IDs which should be associated with the Virtual Machine.

resource_group_name str

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

storage_os_disk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

vm_size str

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

additional_capabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

availability_set_id str

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

boot_diagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

delete_data_disks_on_termination bool

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

delete_os_disk_on_termination bool

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

identity VirtualMachineIdentityArgs

An identity block as defined below.

license_type str

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

location str

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

name str

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

os_profile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

os_profile_linux_config VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

os_profile_secrets Sequence[VirtualMachineOsProfileSecretArgs]

One or more os_profile_secrets blocks as defined below.

os_profile_windows_config VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

plan VirtualMachinePlanArgs

A plan block as defined below.

primary_network_interface_id str

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

storage_data_disks Sequence[VirtualMachineStorageDataDiskArgs]

One or more storage_data_disk blocks as defined below.

storage_image_reference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

tags Mapping[str, str]

A mapping of tags to assign to the Virtual Machine.

zones str

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

networkInterfaceIds List<String>

A list of Network Interface IDs which should be associated with the Virtual Machine.

resourceGroupName String

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

storageOsDisk Property Map

A storage_os_disk block as defined below.

vmSize String

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

additionalCapabilities Property Map

An additional_capabilities block as defined below.

availabilitySetId String

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

bootDiagnostics Property Map

A boot_diagnostics block as defined below.

deleteDataDisksOnTermination Boolean

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

deleteOsDiskOnTermination Boolean

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

identity Property Map

An identity block as defined below.

licenseType String

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

location String

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

name String

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

osProfile Property Map

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

osProfileLinuxConfig Property Map

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

osProfileSecrets List<Property Map>

One or more os_profile_secrets blocks as defined below.

osProfileWindowsConfig Property Map

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

plan Property Map

A plan block as defined below.

primaryNetworkInterfaceId String

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

storageDataDisks List<Property Map>

One or more storage_data_disk blocks as defined below.

storageImageReference Property Map

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

tags Map<String>

A mapping of tags to assign to the Virtual Machine.

zones String

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualMachine 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 VirtualMachine Resource

Get an existing VirtualMachine 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?: VirtualMachineState, opts?: CustomResourceOptions): VirtualMachine
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        additional_capabilities: Optional[VirtualMachineAdditionalCapabilitiesArgs] = None,
        availability_set_id: Optional[str] = None,
        boot_diagnostics: Optional[VirtualMachineBootDiagnosticsArgs] = None,
        delete_data_disks_on_termination: Optional[bool] = None,
        delete_os_disk_on_termination: Optional[bool] = None,
        identity: Optional[VirtualMachineIdentityArgs] = None,
        license_type: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        network_interface_ids: Optional[Sequence[str]] = None,
        os_profile: Optional[VirtualMachineOsProfileArgs] = None,
        os_profile_linux_config: Optional[VirtualMachineOsProfileLinuxConfigArgs] = None,
        os_profile_secrets: Optional[Sequence[VirtualMachineOsProfileSecretArgs]] = None,
        os_profile_windows_config: Optional[VirtualMachineOsProfileWindowsConfigArgs] = None,
        plan: Optional[VirtualMachinePlanArgs] = None,
        primary_network_interface_id: Optional[str] = None,
        proximity_placement_group_id: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        storage_data_disks: Optional[Sequence[VirtualMachineStorageDataDiskArgs]] = None,
        storage_image_reference: Optional[VirtualMachineStorageImageReferenceArgs] = None,
        storage_os_disk: Optional[VirtualMachineStorageOsDiskArgs] = None,
        tags: Optional[Mapping[str, str]] = None,
        vm_size: Optional[str] = None,
        zones: Optional[str] = None) -> VirtualMachine
func GetVirtualMachine(ctx *Context, name string, id IDInput, state *VirtualMachineState, opts ...ResourceOption) (*VirtualMachine, error)
public static VirtualMachine Get(string name, Input<string> id, VirtualMachineState? state, CustomResourceOptions? opts = null)
public static VirtualMachine get(String name, Output<String> id, VirtualMachineState 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:
AdditionalCapabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

AvailabilitySetId string

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

BootDiagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

DeleteDataDisksOnTermination bool

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

DeleteOsDiskOnTermination bool

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

Identity VirtualMachineIdentityArgs

An identity block as defined below.

LicenseType string

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

Location string

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

Name string

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

NetworkInterfaceIds List<string>

A list of Network Interface IDs which should be associated with the Virtual Machine.

OsProfile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

OsProfileLinuxConfig VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

OsProfileSecrets List<VirtualMachineOsProfileSecretArgs>

One or more os_profile_secrets blocks as defined below.

OsProfileWindowsConfig VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

Plan VirtualMachinePlanArgs

A plan block as defined below.

PrimaryNetworkInterfaceId string

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

StorageDataDisks List<VirtualMachineStorageDataDiskArgs>

One or more storage_data_disk blocks as defined below.

StorageImageReference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

StorageOsDisk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

Tags Dictionary<string, string>

A mapping of tags to assign to the Virtual Machine.

VmSize string

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

Zones string

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

AdditionalCapabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

AvailabilitySetId string

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

BootDiagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

DeleteDataDisksOnTermination bool

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

DeleteOsDiskOnTermination bool

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

Identity VirtualMachineIdentityArgs

An identity block as defined below.

LicenseType string

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

Location string

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

Name string

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

NetworkInterfaceIds []string

A list of Network Interface IDs which should be associated with the Virtual Machine.

OsProfile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

OsProfileLinuxConfig VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

OsProfileSecrets []VirtualMachineOsProfileSecretArgs

One or more os_profile_secrets blocks as defined below.

OsProfileWindowsConfig VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

Plan VirtualMachinePlanArgs

A plan block as defined below.

PrimaryNetworkInterfaceId string

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

StorageDataDisks []VirtualMachineStorageDataDiskArgs

One or more storage_data_disk blocks as defined below.

StorageImageReference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

StorageOsDisk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

Tags map[string]string

A mapping of tags to assign to the Virtual Machine.

VmSize string

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

Zones string

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

additionalCapabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

availabilitySetId String

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

bootDiagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

deleteDataDisksOnTermination Boolean

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

deleteOsDiskOnTermination Boolean

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

identity VirtualMachineIdentityArgs

An identity block as defined below.

licenseType String

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

location String

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

name String

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

networkInterfaceIds List<String>

A list of Network Interface IDs which should be associated with the Virtual Machine.

osProfile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

osProfileLinuxConfig VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

osProfileSecrets List<VirtualMachineOsProfileSecretArgs>

One or more os_profile_secrets blocks as defined below.

osProfileWindowsConfig VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

plan VirtualMachinePlanArgs

A plan block as defined below.

primaryNetworkInterfaceId String

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

storageDataDisks List<VirtualMachineStorageDataDiskArgs>

One or more storage_data_disk blocks as defined below.

storageImageReference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

storageOsDisk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

tags Map<String,String>

A mapping of tags to assign to the Virtual Machine.

vmSize String

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

zones String

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

additionalCapabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

availabilitySetId string

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

bootDiagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

deleteDataDisksOnTermination boolean

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

deleteOsDiskOnTermination boolean

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

identity VirtualMachineIdentityArgs

An identity block as defined below.

licenseType string

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

location string

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

name string

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

networkInterfaceIds string[]

A list of Network Interface IDs which should be associated with the Virtual Machine.

osProfile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

osProfileLinuxConfig VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

osProfileSecrets VirtualMachineOsProfileSecretArgs[]

One or more os_profile_secrets blocks as defined below.

osProfileWindowsConfig VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

plan VirtualMachinePlanArgs

A plan block as defined below.

primaryNetworkInterfaceId string

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

storageDataDisks VirtualMachineStorageDataDiskArgs[]

One or more storage_data_disk blocks as defined below.

storageImageReference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

storageOsDisk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

tags {[key: string]: string}

A mapping of tags to assign to the Virtual Machine.

vmSize string

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

zones string

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

additional_capabilities VirtualMachineAdditionalCapabilitiesArgs

An additional_capabilities block as defined below.

availability_set_id str

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

boot_diagnostics VirtualMachineBootDiagnosticsArgs

A boot_diagnostics block as defined below.

delete_data_disks_on_termination bool

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

delete_os_disk_on_termination bool

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

identity VirtualMachineIdentityArgs

An identity block as defined below.

license_type str

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

location str

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

name str

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

network_interface_ids Sequence[str]

A list of Network Interface IDs which should be associated with the Virtual Machine.

os_profile VirtualMachineOsProfileArgs

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

os_profile_linux_config VirtualMachineOsProfileLinuxConfigArgs

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

os_profile_secrets Sequence[VirtualMachineOsProfileSecretArgs]

One or more os_profile_secrets blocks as defined below.

os_profile_windows_config VirtualMachineOsProfileWindowsConfigArgs

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

plan VirtualMachinePlanArgs

A plan block as defined below.

primary_network_interface_id str

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

storage_data_disks Sequence[VirtualMachineStorageDataDiskArgs]

One or more storage_data_disk blocks as defined below.

storage_image_reference VirtualMachineStorageImageReferenceArgs

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

storage_os_disk VirtualMachineStorageOsDiskArgs

A storage_os_disk block as defined below.

tags Mapping[str, str]

A mapping of tags to assign to the Virtual Machine.

vm_size str

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

zones str

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

additionalCapabilities Property Map

An additional_capabilities block as defined below.

availabilitySetId String

The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.

bootDiagnostics Property Map

A boot_diagnostics block as defined below.

deleteDataDisksOnTermination Boolean

Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to false.

deleteOsDiskOnTermination Boolean

Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to false.

identity Property Map

An identity block as defined below.

licenseType String

Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are Windows_Client and Windows_Server.

location String

Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.

name String

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

networkInterfaceIds List<String>

A list of Network Interface IDs which should be associated with the Virtual Machine.

osProfile Property Map

An os_profile block as defined below. Required when create_option in the storage_os_disk block is set to FromImage.

osProfileLinuxConfig Property Map

(Required, when a Linux machine) An os_profile_linux_config block as defined below.

osProfileSecrets List<Property Map>

One or more os_profile_secrets blocks as defined below.

osProfileWindowsConfig Property Map

(Required, when a Windows machine) An os_profile_windows_config block as defined below.

plan Property Map

A plan block as defined below.

primaryNetworkInterfaceId String

The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.

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

Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.

storageDataDisks List<Property Map>

One or more storage_data_disk blocks as defined below.

storageImageReference Property Map

A storage_image_reference block as defined below. Changing this forces a new resource to be created.

storageOsDisk Property Map

A storage_os_disk block as defined below.

tags Map<String>

A mapping of tags to assign to the Virtual Machine.

vmSize String

Specifies the size of the Virtual Machine. See also Azure VM Naming Conventions.

zones String

A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.

Supporting Types

VirtualMachineAdditionalCapabilities

UltraSsdEnabled bool

Should Ultra SSD disk be enabled for this Virtual Machine? Changing this forces a new resource to be created.

UltraSsdEnabled bool

Should Ultra SSD disk be enabled for this Virtual Machine? Changing this forces a new resource to be created.

ultraSsdEnabled Boolean

Should Ultra SSD disk be enabled for this Virtual Machine? Changing this forces a new resource to be created.

ultraSsdEnabled boolean

Should Ultra SSD disk be enabled for this Virtual Machine? Changing this forces a new resource to be created.

ultra_ssd_enabled bool

Should Ultra SSD disk be enabled for this Virtual Machine? Changing this forces a new resource to be created.

ultraSsdEnabled Boolean

Should Ultra SSD disk be enabled for this Virtual Machine? Changing this forces a new resource to be created.

VirtualMachineBootDiagnostics

Enabled bool

Should Boot Diagnostics be enabled for this Virtual Machine?

StorageUri string

The Storage Account's Blob Endpoint which should hold the virtual machine's diagnostic files.

Enabled bool

Should Boot Diagnostics be enabled for this Virtual Machine?

StorageUri string

The Storage Account's Blob Endpoint which should hold the virtual machine's diagnostic files.

enabled Boolean

Should Boot Diagnostics be enabled for this Virtual Machine?

storageUri String

The Storage Account's Blob Endpoint which should hold the virtual machine's diagnostic files.

enabled boolean

Should Boot Diagnostics be enabled for this Virtual Machine?

storageUri string

The Storage Account's Blob Endpoint which should hold the virtual machine's diagnostic files.

enabled bool

Should Boot Diagnostics be enabled for this Virtual Machine?

storage_uri str

The Storage Account's Blob Endpoint which should hold the virtual machine's diagnostic files.

enabled Boolean

Should Boot Diagnostics be enabled for this Virtual Machine?

storageUri String

The Storage Account's Blob Endpoint which should hold the virtual machine's diagnostic files.

VirtualMachineIdentity

Type string

Specifies the type of Managed Service Identity that should be configured on this Virtual Machine. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both).

IdentityIds List<string>

Specifies a list of User Assigned Managed Identity IDs to be assigned to this Virtual Machine.

PrincipalId string

The Principal ID associated with this Managed Service Identity.

Type string

Specifies the type of Managed Service Identity that should be configured on this Virtual Machine. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both).

IdentityIds []string

Specifies a list of User Assigned Managed Identity IDs to be assigned to this Virtual Machine.

PrincipalId string

The Principal ID associated with this Managed Service Identity.

type String

Specifies the type of Managed Service Identity that should be configured on this Virtual Machine. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both).

identityIds List<String>

Specifies a list of User Assigned Managed Identity IDs to be assigned to this Virtual Machine.

principalId String

The Principal ID associated with this Managed Service Identity.

type string

Specifies the type of Managed Service Identity that should be configured on this Virtual Machine. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both).

identityIds string[]

Specifies a list of User Assigned Managed Identity IDs to be assigned to this Virtual Machine.

principalId string

The Principal ID associated with this Managed Service Identity.

type str

Specifies the type of Managed Service Identity that should be configured on this Virtual Machine. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both).

identity_ids Sequence[str]

Specifies a list of User Assigned Managed Identity IDs to be assigned to this Virtual Machine.

principal_id str

The Principal ID associated with this Managed Service Identity.

type String

Specifies the type of Managed Service Identity that should be configured on this Virtual Machine. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both).

identityIds List<String>

Specifies a list of User Assigned Managed Identity IDs to be assigned to this Virtual Machine.

principalId String

The Principal ID associated with this Managed Service Identity.

VirtualMachineOsProfile

AdminUsername string

Specifies the name of the local administrator account.

ComputerName string

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

AdminPassword string

(Optional for Windows, Optional for Linux) The password associated with the local administrator account.

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. Changing this forces a new resource to be created.

AdminUsername string

Specifies the name of the local administrator account.

ComputerName string

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

AdminPassword string

(Optional for Windows, Optional for Linux) The password associated with the local administrator account.

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. Changing this forces a new resource to be created.

adminUsername String

Specifies the name of the local administrator account.

computerName String

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

adminPassword String

(Optional for Windows, Optional for Linux) The password associated with the local administrator account.

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. Changing this forces a new resource to be created.

adminUsername string

Specifies the name of the local administrator account.

computerName string

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

adminPassword string

(Optional for Windows, Optional for Linux) The password associated with the local administrator account.

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. Changing this forces a new resource to be created.

admin_username str

Specifies the name of the local administrator account.

computer_name str

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

admin_password str

(Optional for Windows, Optional for Linux) The password associated with the local administrator account.

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. Changing this forces a new resource to be created.

adminUsername String

Specifies the name of the local administrator account.

computerName String

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

adminPassword String

(Optional for Windows, Optional for Linux) The password associated with the local administrator account.

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. Changing this forces a new resource to be created.

VirtualMachineOsProfileLinuxConfig

DisablePasswordAuthentication bool

Specifies whether password authentication should be disabled. If set to false, an admin_password must be specified.

SshKeys List<VirtualMachineOsProfileLinuxConfigSshKey>

One or more ssh_keys blocks as defined below. This field is required if disable_password_authentication is set to true.

DisablePasswordAuthentication bool

Specifies whether password authentication should be disabled. If set to false, an admin_password must be specified.

SshKeys []VirtualMachineOsProfileLinuxConfigSshKey

One or more ssh_keys blocks as defined below. This field is required if disable_password_authentication is set to true.

disablePasswordAuthentication Boolean

Specifies whether password authentication should be disabled. If set to false, an admin_password must be specified.

sshKeys List<VirtualMachineOsProfileLinuxConfigSshKey>

One or more ssh_keys blocks as defined below. This field is required if disable_password_authentication is set to true.

disablePasswordAuthentication boolean

Specifies whether password authentication should be disabled. If set to false, an admin_password must be specified.

sshKeys VirtualMachineOsProfileLinuxConfigSshKey[]

One or more ssh_keys blocks as defined below. This field is required if disable_password_authentication is set to true.

disable_password_authentication bool

Specifies whether password authentication should be disabled. If set to false, an admin_password must be specified.

ssh_keys Sequence[VirtualMachineOsProfileLinuxConfigSshKey]

One or more ssh_keys blocks as defined below. This field is required if disable_password_authentication is set to true.

disablePasswordAuthentication Boolean

Specifies whether password authentication should be disabled. If set to false, an admin_password must be specified.

sshKeys List<Property Map>

One or more ssh_keys blocks as defined below. This field is required if disable_password_authentication is set to true.

VirtualMachineOsProfileLinuxConfigSshKey

KeyData string

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

Path string

The path of the destination file on the virtual machine

KeyData string

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

Path string

The path of the destination file on the virtual machine

keyData String

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

path String

The path of the destination file on the virtual machine

keyData string

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

path string

The path of the destination file on the virtual machine

key_data str

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

path str

The path of the destination file on the virtual machine

keyData String

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

path String

The path of the destination file on the virtual machine

VirtualMachineOsProfileSecret

SourceVaultId string

Specifies the ID of the Key Vault to use.

VaultCertificates List<VirtualMachineOsProfileSecretVaultCertificate>

One or more vault_certificates blocks as defined below.

SourceVaultId string

Specifies the ID of the Key Vault to use.

VaultCertificates []VirtualMachineOsProfileSecretVaultCertificate

One or more vault_certificates blocks as defined below.

sourceVaultId String

Specifies the ID of the Key Vault to use.

vaultCertificates List<VirtualMachineOsProfileSecretVaultCertificate>

One or more vault_certificates blocks as defined below.

sourceVaultId string

Specifies the ID of the Key Vault to use.

vaultCertificates VirtualMachineOsProfileSecretVaultCertificate[]

One or more vault_certificates blocks as defined below.

source_vault_id str

Specifies the ID of the Key Vault to use.

vault_certificates Sequence[VirtualMachineOsProfileSecretVaultCertificate]

One or more vault_certificates blocks as defined below.

sourceVaultId String

Specifies the ID of the Key Vault to use.

vaultCertificates List<Property Map>

One or more vault_certificates blocks as defined below.

VirtualMachineOsProfileSecretVaultCertificate

CertificateUrl string

The ID of the Key Vault Secret. Stored secret is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be:

CertificateStore string

(Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to, such as My.

CertificateUrl string

The ID of the Key Vault Secret. Stored secret is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be:

CertificateStore string

(Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to, such as My.

certificateUrl String

The ID of the Key Vault Secret. Stored secret is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be:

certificateStore String

(Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to, such as My.

certificateUrl string

The ID of the Key Vault Secret. Stored secret is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be:

certificateStore string

(Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to, such as My.

certificate_url str

The ID of the Key Vault Secret. Stored secret is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be:

certificate_store str

(Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to, such as My.

certificateUrl String

The ID of the Key Vault Secret. Stored secret is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be:

certificateStore String

(Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to, such as My.

VirtualMachineOsProfileWindowsConfig

AdditionalUnattendConfigs List<VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfig>

An additional_unattend_config block as defined below.

EnableAutomaticUpgrades bool

Are automatic updates enabled on this Virtual Machine? Defaults to false.

ProvisionVmAgent bool

Should the Azure Virtual Machine Guest Agent be installed on this Virtual Machine? Defaults to false.

Timezone string

Specifies the time zone of the virtual machine, the possible values are defined here. Changing this forces a new resource to be created.

Winrms List<VirtualMachineOsProfileWindowsConfigWinrm>

One or more winrm blocks as defined below.

AdditionalUnattendConfigs []VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfig

An additional_unattend_config block as defined below.

EnableAutomaticUpgrades bool

Are automatic updates enabled on this Virtual Machine? Defaults to false.

ProvisionVmAgent bool

Should the Azure Virtual Machine Guest Agent be installed on this Virtual Machine? Defaults to false.

Timezone string

Specifies the time zone of the virtual machine, the possible values are defined here. Changing this forces a new resource to be created.

Winrms []VirtualMachineOsProfileWindowsConfigWinrm

One or more winrm blocks as defined below.

additionalUnattendConfigs List<VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfig>

An additional_unattend_config block as defined below.

enableAutomaticUpgrades Boolean

Are automatic updates enabled on this Virtual Machine? Defaults to false.

provisionVmAgent Boolean

Should the Azure Virtual Machine Guest Agent be installed on this Virtual Machine? Defaults to false.

timezone String

Specifies the time zone of the virtual machine, the possible values are defined here. Changing this forces a new resource to be created.

winrms List<VirtualMachineOsProfileWindowsConfigWinrm>

One or more winrm blocks as defined below.

additionalUnattendConfigs VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfig[]

An additional_unattend_config block as defined below.

enableAutomaticUpgrades boolean

Are automatic updates enabled on this Virtual Machine? Defaults to false.

provisionVmAgent boolean

Should the Azure Virtual Machine Guest Agent be installed on this Virtual Machine? Defaults to false.

timezone string

Specifies the time zone of the virtual machine, the possible values are defined here. Changing this forces a new resource to be created.

winrms VirtualMachineOsProfileWindowsConfigWinrm[]

One or more winrm blocks as defined below.

additional_unattend_configs Sequence[VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfig]

An additional_unattend_config block as defined below.

enable_automatic_upgrades bool

Are automatic updates enabled on this Virtual Machine? Defaults to false.

provision_vm_agent bool

Should the Azure Virtual Machine Guest Agent be installed on this Virtual Machine? Defaults to false.

timezone str

Specifies the time zone of the virtual machine, the possible values are defined here. Changing this forces a new resource to be created.

winrms Sequence[VirtualMachineOsProfileWindowsConfigWinrm]

One or more winrm blocks as defined below.

additionalUnattendConfigs List<Property Map>

An additional_unattend_config block as defined below.

enableAutomaticUpgrades Boolean

Are automatic updates enabled on this Virtual Machine? Defaults to false.

provisionVmAgent Boolean

Should the Azure Virtual Machine Guest Agent be installed on this Virtual Machine? Defaults to false.

timezone String

Specifies the time zone of the virtual machine, the possible values are defined here. Changing this forces a new resource to be created.

winrms List<Property Map>

One or more winrm blocks as defined below.

VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfig

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.

VirtualMachineOsProfileWindowsConfigWinrm

Protocol string

Specifies the protocol of listener. Possible values are HTTP or HTTPS.

CertificateUrl string

The ID of the Key Vault Secret which contains the encrypted Certificate which should be installed on the Virtual Machine. This certificate must also be specified in the vault_certificates block within the os_profile_secrets block.

Protocol string

Specifies the protocol of listener. Possible values are HTTP or HTTPS.

CertificateUrl string

The ID of the Key Vault Secret which contains the encrypted Certificate which should be installed on the Virtual Machine. This certificate must also be specified in the vault_certificates block within the os_profile_secrets block.

protocol String

Specifies the protocol of listener. Possible values are HTTP or HTTPS.

certificateUrl String

The ID of the Key Vault Secret which contains the encrypted Certificate which should be installed on the Virtual Machine. This certificate must also be specified in the vault_certificates block within the os_profile_secrets block.

protocol string

Specifies the protocol of listener. Possible values are HTTP or HTTPS.

certificateUrl string

The ID of the Key Vault Secret which contains the encrypted Certificate which should be installed on the Virtual Machine. This certificate must also be specified in the vault_certificates block within the os_profile_secrets block.

protocol str

Specifies the protocol of listener. Possible values are HTTP or HTTPS.

certificate_url str

The ID of the Key Vault Secret which contains the encrypted Certificate which should be installed on the Virtual Machine. This certificate must also be specified in the vault_certificates block within the os_profile_secrets block.

protocol String

Specifies the protocol of listener. Possible values are HTTP or HTTPS.

certificateUrl String

The ID of the Key Vault Secret which contains the encrypted Certificate which should be installed on the Virtual Machine. This certificate must also be specified in the vault_certificates block within the os_profile_secrets block.

VirtualMachinePlan

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.

VirtualMachineStorageDataDisk

CreateOption string

Specifies how the data disk should be created. Possible values are Attach, FromImage and Empty.

Lun int

Specifies the logical unit number of the data disk. This needs to be unique within all the Data Disks on the Virtual Machine.

Name string

The name of the Data Disk.

Caching string

Specifies the caching requirements for the Data Disk. Possible values include None, ReadOnly and ReadWrite.

DiskSizeGb int

Specifies the size of the data disk in gigabytes.

ManagedDiskId string

Specifies the ID of an Existing Managed Disk which should be attached to this Virtual Machine. When this field is set create_option must be set to Attach.

ManagedDiskType string

Specifies the type of managed disk to create. Possible values are either Standard_LRS, StandardSSD_LRS, Premium_LRS or UltraSSD_LRS.

VhdUri string

Specifies the URI of the VHD file backing this Unmanaged Data Disk.

WriteAcceleratorEnabled bool

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

CreateOption string

Specifies how the data disk should be created. Possible values are Attach, FromImage and Empty.

Lun int

Specifies the logical unit number of the data disk. This needs to be unique within all the Data Disks on the Virtual Machine.

Name string

The name of the Data Disk.

Caching string

Specifies the caching requirements for the Data Disk. Possible values include None, ReadOnly and ReadWrite.

DiskSizeGb int

Specifies the size of the data disk in gigabytes.

ManagedDiskId string

Specifies the ID of an Existing Managed Disk which should be attached to this Virtual Machine. When this field is set create_option must be set to Attach.

ManagedDiskType string

Specifies the type of managed disk to create. Possible values are either Standard_LRS, StandardSSD_LRS, Premium_LRS or UltraSSD_LRS.

VhdUri string

Specifies the URI of the VHD file backing this Unmanaged Data Disk.

WriteAcceleratorEnabled bool

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

createOption String

Specifies how the data disk should be created. Possible values are Attach, FromImage and Empty.

lun Integer

Specifies the logical unit number of the data disk. This needs to be unique within all the Data Disks on the Virtual Machine.

name String

The name of the Data Disk.

caching String

Specifies the caching requirements for the Data Disk. Possible values include None, ReadOnly and ReadWrite.

diskSizeGb Integer

Specifies the size of the data disk in gigabytes.

managedDiskId String

Specifies the ID of an Existing Managed Disk which should be attached to this Virtual Machine. When this field is set create_option must be set to Attach.

managedDiskType String

Specifies the type of managed disk to create. Possible values are either Standard_LRS, StandardSSD_LRS, Premium_LRS or UltraSSD_LRS.

vhdUri String

Specifies the URI of the VHD file backing this Unmanaged Data Disk.

writeAcceleratorEnabled Boolean

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

createOption string

Specifies how the data disk should be created. Possible values are Attach, FromImage and Empty.

lun number

Specifies the logical unit number of the data disk. This needs to be unique within all the Data Disks on the Virtual Machine.

name string

The name of the Data Disk.

caching string

Specifies the caching requirements for the Data Disk. Possible values include None, ReadOnly and ReadWrite.

diskSizeGb number

Specifies the size of the data disk in gigabytes.

managedDiskId string

Specifies the ID of an Existing Managed Disk which should be attached to this Virtual Machine. When this field is set create_option must be set to Attach.

managedDiskType string

Specifies the type of managed disk to create. Possible values are either Standard_LRS, StandardSSD_LRS, Premium_LRS or UltraSSD_LRS.

vhdUri string

Specifies the URI of the VHD file backing this Unmanaged Data Disk.

writeAcceleratorEnabled boolean

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

create_option str

Specifies how the data disk should be created. Possible values are Attach, FromImage and Empty.

lun int

Specifies the logical unit number of the data disk. This needs to be unique within all the Data Disks on the Virtual Machine.

name str

The name of the Data Disk.

caching str

Specifies the caching requirements for the Data Disk. Possible values include None, ReadOnly and ReadWrite.

disk_size_gb int

Specifies the size of the data disk in gigabytes.

managed_disk_id str

Specifies the ID of an Existing Managed Disk which should be attached to this Virtual Machine. When this field is set create_option must be set to Attach.

managed_disk_type str

Specifies the type of managed disk to create. Possible values are either Standard_LRS, StandardSSD_LRS, Premium_LRS or UltraSSD_LRS.

vhd_uri str

Specifies the URI of the VHD file backing this Unmanaged Data Disk.

write_accelerator_enabled bool

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

createOption String

Specifies how the data disk should be created. Possible values are Attach, FromImage and Empty.

lun Number

Specifies the logical unit number of the data disk. This needs to be unique within all the Data Disks on the Virtual Machine.

name String

The name of the Data Disk.

caching String

Specifies the caching requirements for the Data Disk. Possible values include None, ReadOnly and ReadWrite.

diskSizeGb Number

Specifies the size of the data disk in gigabytes.

managedDiskId String

Specifies the ID of an Existing Managed Disk which should be attached to this Virtual Machine. When this field is set create_option must be set to Attach.

managedDiskType String

Specifies the type of managed disk to create. Possible values are either Standard_LRS, StandardSSD_LRS, Premium_LRS or UltraSSD_LRS.

vhdUri String

Specifies the URI of the VHD file backing this Unmanaged Data Disk.

writeAcceleratorEnabled Boolean

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

VirtualMachineStorageImageReference

Id string

Specifies the ID of the Custom Image which the Virtual Machine should be created from. Changing this forces a new resource to be created.

Offer string

Specifies the offer of the image used to create the virtual machine. Changing this forces a new resource to be created.

Publisher string

Specifies the publisher of the image used to create the virtual machine. Changing this forces a new resource to be created.

Sku string

Specifies the SKU of the image used to create the virtual machine. Changing this forces a new resource to be created.

Version string

Specifies the version of the image used to create the virtual machine. Changing this forces a new resource to be created.

Id string

Specifies the ID of the Custom Image which the Virtual Machine should be created from. Changing this forces a new resource to be created.

Offer string

Specifies the offer of the image used to create the virtual machine. Changing this forces a new resource to be created.

Publisher string

Specifies the publisher of the image used to create the virtual machine. Changing this forces a new resource to be created.

Sku string

Specifies the SKU of the image used to create the virtual machine. Changing this forces a new resource to be created.

Version string

Specifies the version of the image used to create the virtual machine. Changing this forces a new resource to be created.

id String

Specifies the ID of the Custom Image which the Virtual Machine should be created from. Changing this forces a new resource to be created.

offer String

Specifies the offer of the image used to create the virtual machine. Changing this forces a new resource to be created.

publisher String

Specifies the publisher of the image used to create the virtual machine. Changing this forces a new resource to be created.

sku String

Specifies the SKU of the image used to create the virtual machine. Changing this forces a new resource to be created.

version String

Specifies the version of the image used to create the virtual machine. Changing this forces a new resource to be created.

id string

Specifies the ID of the Custom Image which the Virtual Machine should be created from. Changing this forces a new resource to be created.

offer string

Specifies the offer of the image used to create the virtual machine. Changing this forces a new resource to be created.

publisher string

Specifies the publisher of the image used to create the virtual machine. Changing this forces a new resource to be created.

sku string

Specifies the SKU of the image used to create the virtual machine. Changing this forces a new resource to be created.

version string

Specifies the version of the image used to create the virtual machine. Changing this forces a new resource to be created.

id str

Specifies the ID of the Custom Image which the Virtual Machine should be created from. Changing this forces a new resource to be created.

offer str

Specifies the offer of the image used to create the virtual machine. Changing this forces a new resource to be created.

publisher str

Specifies the publisher of the image used to create the virtual machine. Changing this forces a new resource to be created.

sku str

Specifies the SKU of the image used to create the virtual machine. Changing this forces a new resource to be created.

version str

Specifies the version of the image used to create the virtual machine. Changing this forces a new resource to be created.

id String

Specifies the ID of the Custom Image which the Virtual Machine should be created from. Changing this forces a new resource to be created.

offer String

Specifies the offer of the image used to create the virtual machine. Changing this forces a new resource to be created.

publisher String

Specifies the publisher of the image used to create the virtual machine. Changing this forces a new resource to be created.

sku String

Specifies the SKU of the image used to create the virtual machine. Changing this forces a new resource to be created.

version String

Specifies the version of the image used to create the virtual machine. Changing this forces a new resource to be created.

VirtualMachineStorageOsDisk

CreateOption string

Specifies how the OS Disk should be created. Possible values are Attach (managed disks only) and FromImage.

Name string

Specifies the name of the OS Disk.

Caching string

Specifies the caching requirements for the OS Disk. Possible values include None, ReadOnly and ReadWrite.

DiskSizeGb int

Specifies the size of the OS Disk in gigabytes.

ImageUri string

Specifies the Image URI in the format publisherName:offer:skus:version. This field can also specify the VHD URI of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the os_type field must be set.

ManagedDiskId string

Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the create_option must be set to Attach. Changing this forces a new resource to be created.

ManagedDiskType string

Specifies the type of Managed Disk which should be created. Possible values are Standard_LRS, StandardSSD_LRS or Premium_LRS.

OsType string

Specifies the Operating System on the OS Disk. Possible values are Linux and Windows.

VhdUri string

Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.

WriteAcceleratorEnabled bool

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

CreateOption string

Specifies how the OS Disk should be created. Possible values are Attach (managed disks only) and FromImage.

Name string

Specifies the name of the OS Disk.

Caching string

Specifies the caching requirements for the OS Disk. Possible values include None, ReadOnly and ReadWrite.

DiskSizeGb int

Specifies the size of the OS Disk in gigabytes.

ImageUri string

Specifies the Image URI in the format publisherName:offer:skus:version. This field can also specify the VHD URI of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the os_type field must be set.

ManagedDiskId string

Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the create_option must be set to Attach. Changing this forces a new resource to be created.

ManagedDiskType string

Specifies the type of Managed Disk which should be created. Possible values are Standard_LRS, StandardSSD_LRS or Premium_LRS.

OsType string

Specifies the Operating System on the OS Disk. Possible values are Linux and Windows.

VhdUri string

Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.

WriteAcceleratorEnabled bool

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

createOption String

Specifies how the OS Disk should be created. Possible values are Attach (managed disks only) and FromImage.

name String

Specifies the name of the OS Disk.

caching String

Specifies the caching requirements for the OS Disk. Possible values include None, ReadOnly and ReadWrite.

diskSizeGb Integer

Specifies the size of the OS Disk in gigabytes.

imageUri String

Specifies the Image URI in the format publisherName:offer:skus:version. This field can also specify the VHD URI of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the os_type field must be set.

managedDiskId String

Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the create_option must be set to Attach. Changing this forces a new resource to be created.

managedDiskType String

Specifies the type of Managed Disk which should be created. Possible values are Standard_LRS, StandardSSD_LRS or Premium_LRS.

osType String

Specifies the Operating System on the OS Disk. Possible values are Linux and Windows.

vhdUri String

Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.

writeAcceleratorEnabled Boolean

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

createOption string

Specifies how the OS Disk should be created. Possible values are Attach (managed disks only) and FromImage.

name string

Specifies the name of the OS Disk.

caching string

Specifies the caching requirements for the OS Disk. Possible values include None, ReadOnly and ReadWrite.

diskSizeGb number

Specifies the size of the OS Disk in gigabytes.

imageUri string

Specifies the Image URI in the format publisherName:offer:skus:version. This field can also specify the VHD URI of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the os_type field must be set.

managedDiskId string

Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the create_option must be set to Attach. Changing this forces a new resource to be created.

managedDiskType string

Specifies the type of Managed Disk which should be created. Possible values are Standard_LRS, StandardSSD_LRS or Premium_LRS.

osType string

Specifies the Operating System on the OS Disk. Possible values are Linux and Windows.

vhdUri string

Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.

writeAcceleratorEnabled boolean

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

create_option str

Specifies how the OS Disk should be created. Possible values are Attach (managed disks only) and FromImage.

name str

Specifies the name of the OS Disk.

caching str

Specifies the caching requirements for the OS Disk. Possible values include None, ReadOnly and ReadWrite.

disk_size_gb int

Specifies the size of the OS Disk in gigabytes.

image_uri str

Specifies the Image URI in the format publisherName:offer:skus:version. This field can also specify the VHD URI of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the os_type field must be set.

managed_disk_id str

Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the create_option must be set to Attach. Changing this forces a new resource to be created.

managed_disk_type str

Specifies the type of Managed Disk which should be created. Possible values are Standard_LRS, StandardSSD_LRS or Premium_LRS.

os_type str

Specifies the Operating System on the OS Disk. Possible values are Linux and Windows.

vhd_uri str

Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.

write_accelerator_enabled bool

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

createOption String

Specifies how the OS Disk should be created. Possible values are Attach (managed disks only) and FromImage.

name String

Specifies the name of the OS Disk.

caching String

Specifies the caching requirements for the OS Disk. Possible values include None, ReadOnly and ReadWrite.

diskSizeGb Number

Specifies the size of the OS Disk in gigabytes.

imageUri String

Specifies the Image URI in the format publisherName:offer:skus:version. This field can also specify the VHD URI of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the os_type field must be set.

managedDiskId String

Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the create_option must be set to Attach. Changing this forces a new resource to be created.

managedDiskType String

Specifies the type of Managed Disk which should be created. Possible values are Standard_LRS, StandardSSD_LRS or Premium_LRS.

osType String

Specifies the Operating System on the OS Disk. Possible values are Linux and Windows.

vhdUri String

Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.

writeAcceleratorEnabled Boolean

Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.

Import

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

 $ pulumi import azure:compute/virtualMachine:VirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachines/machine1

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.