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
featuresconfiguration 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.VirtualMachineresource 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.VirtualMachineresource instead.
In this release there's a known issue where the
public_ip_addressandpublic_ip_addressesfields may not be fully populated for Dynamic Public IP's.
Inherited Members
Namespace: Pulumi.Azure.Compute
Assembly: Pulumi.Azure.dll
Syntax
public class LinuxVirtualMachine : CustomResource
Constructors
View SourceLinuxVirtualMachine(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 SourceAdditionalCapabilities
A additional_capabilities block as defined below.
Declaration
public Output<LinuxVirtualMachineAdditionalCapabilities> AdditionalCapabilities { get; }
Property Value
| Type | Description |
|---|---|
| Output<LinuxVirtualMachineAdditionalCapabilities> |
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> |
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>> |
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> |
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>> |
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> |
BootDiagnostics
A boot_diagnostics block as defined below.
Declaration
public Output<LinuxVirtualMachineBootDiagnostics> BootDiagnostics { get; }
Property Value
| Type | Description |
|---|---|
| Output<LinuxVirtualMachineBootDiagnostics> |
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> |
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> |
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> |
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>> |
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> |
Identity
An identity block as defined below.
Declaration
public Output<LinuxVirtualMachineIdentity> Identity { get; }
Property Value
| Type | Description |
|---|---|
| Output<LinuxVirtualMachineIdentity> |
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> |
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>> |
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> |
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>> |
OsDisk
A os_disk block as defined below.
Declaration
public Output<LinuxVirtualMachineOsDisk> OsDisk { get; }
Property Value
| Type | Description |
|---|---|
| Output<LinuxVirtualMachineOsDisk> |
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> |
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> |
PrivateIpAddress
The Primary Private IP Address assigned to this Virtual Machine.
Declaration
public Output<string> PrivateIpAddress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
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>> |
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> |
PublicIpAddress
The Primary Public IP Address assigned to this Virtual Machine.
Declaration
public Output<string> PublicIpAddress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
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> |
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>> |
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> |
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> |
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> |
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>> |
VirtualMachineId
A 128-bit identifier which uniquely identifies this Virtual Machine.
Declaration
public Output<string> VirtualMachineId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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 SourceGet(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 |