Show / Hide Table of Contents

Class LinuxVirtualMachine

Manages a Linux Virtual Machine.

Disclaimers

Note This provider will automatically remove the OS Disk by default - this behaviour can be configured using the features configuration within the Provider configuration block.

Note This resource does not support Unmanaged Disks. If you need to use Unmanaged Disks you can continue to use the azure.compute.VirtualMachine resource instead.

Note This resource does not support attaching existing OS Disks. You can instead capture an image of the OS Disk or continue to use the azure.compute.VirtualMachine resource instead.

In this release there's a known issue where the public_ip_address and public_ip_addresses fields may not be fully populated for Dynamic Public IP's.

Inheritance
System.Object
Resource
CustomResource
LinuxVirtualMachine
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.Compute
Assembly: Pulumi.Azure.dll
Syntax
public class LinuxVirtualMachine : CustomResource

Constructors

View Source

LinuxVirtualMachine(String, LinuxVirtualMachineArgs, CustomResourceOptions)

Create a LinuxVirtualMachine resource with the given unique name, arguments, and options.

Declaration
public LinuxVirtualMachine(string name, LinuxVirtualMachineArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

LinuxVirtualMachineArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AdditionalCapabilities

A additional_capabilities block as defined below.

Declaration
public Output<LinuxVirtualMachineAdditionalCapabilities> AdditionalCapabilities { get; }
Property Value
Type Description
Output<LinuxVirtualMachineAdditionalCapabilities>
View Source

AdminPassword

The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created.

Declaration
public Output<string> AdminPassword { get; }
Property Value
Type Description
Output<System.String>
View Source

AdminSshKeys

One or more admin_ssh_key blocks as defined below.

Declaration
public Output<ImmutableArray<LinuxVirtualMachineAdminSshKey>> AdminSshKeys { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<LinuxVirtualMachineAdminSshKey>>
View Source

AdminUsername

The username of the local administrator used for the Virtual Machine. Changing this forces a new resource to be created.

Declaration
public Output<string> AdminUsername { get; }
Property Value
Type Description
Output<System.String>
View Source

AllowExtensionOperations

Should Extension Operations be allowed on this Virtual Machine? Changing this forces a new resource to be created.

Declaration
public Output<bool?> AllowExtensionOperations { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

AvailabilitySetId

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

Declaration
public Output<string> AvailabilitySetId { get; }
Property Value
Type Description
Output<System.String>
View Source

BootDiagnostics

A boot_diagnostics block as defined below.

Declaration
public Output<LinuxVirtualMachineBootDiagnostics> BootDiagnostics { get; }
Property Value
Type Description
Output<LinuxVirtualMachineBootDiagnostics>
View Source

ComputerName

Specifies the Hostname which should be used for this Virtual Machine. If unspecified this defaults to the value for the name field. If the value of the name field is not a valid computer_name, then you must specify computer_name. Changing this forces a new resource to be created.

Declaration
public Output<string> ComputerName { get; }
Property Value
Type Description
Output<System.String>
View Source

CustomData

The Base64-Encoded Custom Data which should be used for this Virtual Machine. Changing this forces a new resource to be created.

Declaration
public Output<string> CustomData { get; }
Property Value
Type Description
Output<System.String>
View Source

DedicatedHostId

The ID of a Dedicated Host where this machine should be run on. Changing this forces a new resource to be created.

Declaration
public Output<string> DedicatedHostId { get; }
Property Value
Type Description
Output<System.String>
View Source

DisablePasswordAuthentication

Should Password Authentication be disabled on this Virtual Machine? Defaults to true. Changing this forces a new resource to be created.

Declaration
public Output<bool?> DisablePasswordAuthentication { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

EvictionPolicy

Specifies what should happen when the Virtual Machine is evicted for price reasons when using a Spot instance. At this time the only supported value is Deallocate. Changing this forces a new resource to be created.

Declaration
public Output<string> EvictionPolicy { get; }
Property Value
Type Description
Output<System.String>
View Source

Identity

An identity block as defined below.

Declaration
public Output<LinuxVirtualMachineIdentity> Identity { get; }
Property Value
Type Description
Output<LinuxVirtualMachineIdentity>
View Source

Location

The Azure location where the Linux Virtual Machine should exist. Changing this forces a new resource to be created.

Declaration
public Output<string> Location { get; }
Property Value
Type Description
Output<System.String>
View Source

MaxBidPrice

The maximum price you're willing to pay for this Virtual Machine, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machine will be evicted using the eviction_policy. Defaults to -1, which means that the Virtual Machine should not be evicted for price reasons.

Declaration
public Output<double?> MaxBidPrice { get; }
Property Value
Type Description
Output<System.Nullable<System.Double>>
View Source

Name

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

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

NetworkInterfaceIds

. A list of Network Interface ID's which should be attached to this Virtual Machine. The first Network Interface ID in this list will be the Primary Network Interface on the Virtual Machine.

Declaration
public Output<ImmutableArray<string>> NetworkInterfaceIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

OsDisk

A os_disk block as defined below.

Declaration
public Output<LinuxVirtualMachineOsDisk> OsDisk { get; }
Property Value
Type Description
Output<LinuxVirtualMachineOsDisk>
View Source

Plan

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

Declaration
public Output<LinuxVirtualMachinePlan> Plan { get; }
Property Value
Type Description
Output<LinuxVirtualMachinePlan>
View Source

Priority

Specifies the priority of this Virtual Machine. Possible values are Regular and Spot. Defaults to Regular. Changing this forces a new resource to be created.

Declaration
public Output<string> Priority { get; }
Property Value
Type Description
Output<System.String>
View Source

PrivateIpAddress

The Primary Private IP Address assigned to this Virtual Machine.

Declaration
public Output<string> PrivateIpAddress { get; }
Property Value
Type Description
Output<System.String>
View Source

PrivateIpAddresses

A list of Private IP Addresses assigned to this Virtual Machine.

Declaration
public Output<ImmutableArray<string>> PrivateIpAddresses { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

ProvisionVmAgent

Should the Azure VM Agent be provisioned on this Virtual Machine? Defaults to true. Changing this forces a new resource to be created.

Declaration
public Output<bool?> ProvisionVmAgent { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

ProximityPlacementGroupId

The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. Changing this forces a new resource to be created.

Declaration
public Output<string> ProximityPlacementGroupId { get; }
Property Value
Type Description
Output<System.String>
View Source

PublicIpAddress

The Primary Public IP Address assigned to this Virtual Machine.

Declaration
public Output<string> PublicIpAddress { get; }
Property Value
Type Description
Output<System.String>
View Source

PublicIpAddresses

A list of the Public IP Addresses assigned to this Virtual Machine.

Declaration
public Output<ImmutableArray<string>> PublicIpAddresses { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

ResourceGroupName

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

Declaration
public Output<string> ResourceGroupName { get; }
Property Value
Type Description
Output<System.String>
View Source

Secrets

One or more secret blocks as defined below.

Declaration
public Output<ImmutableArray<LinuxVirtualMachineSecret>> Secrets { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<LinuxVirtualMachineSecret>>
View Source

Size

The SKU which should be used for this Virtual Machine, such as Standard_F2.

Declaration
public Output<string> Size { get; }
Property Value
Type Description
Output<System.String>
View Source

SourceImageId

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

Declaration
public Output<string> SourceImageId { get; }
Property Value
Type Description
Output<System.String>
View Source

SourceImageReference

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

Declaration
public Output<LinuxVirtualMachineSourceImageReference> SourceImageReference { get; }
Property Value
Type Description
Output<LinuxVirtualMachineSourceImageReference>
View Source

Tags

A mapping of tags which should be assigned to this Virtual Machine.

Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

VirtualMachineId

A 128-bit identifier which uniquely identifies this Virtual Machine.

Declaration
public Output<string> VirtualMachineId { get; }
Property Value
Type Description
Output<System.String>
View Source

VirtualMachineScaleSetId

Specifies the Orchestrated Virtual Machine Scale Set that this Virtual Machine should be created within. Changing this forces a new resource to be created.

Declaration
public Output<string> VirtualMachineScaleSetId { get; }
Property Value
Type Description
Output<System.String>
View Source

Zone

The Zone in which this Virtual Machine should be created. Changing this forces a new resource to be created.

Declaration
public Output<string> Zone { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, LinuxVirtualMachineState, CustomResourceOptions)

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

Declaration
public static LinuxVirtualMachine Get(string name, Input<string> id, LinuxVirtualMachineState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

LinuxVirtualMachineState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
LinuxVirtualMachine
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.