import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Linux Virtual Machine within a Dev Test Lab. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as std from "@pulumi/std"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleLab = new azure.devtest.Lab("example", { * name: "example-devtestlab", * location: example.location, * resourceGroupName: example.name, * tags: { * Sydney: "Australia", * }, * }); * const exampleVirtualNetwork = new azure.devtest.VirtualNetwork("example", { * name: "example-network", * labName: exampleLab.name, * resourceGroupName: example.name, * subnet: { * usePublicIpAddress: "Allow", * useInVirtualMachineCreation: "Allow", * }, * }); * const exampleLinuxVirtualMachine = new azure.devtest.LinuxVirtualMachine("example", { * name: "example-vm03", * labName: exampleLab.name, * resourceGroupName: example.name, * location: example.location, * size: "Standard_DS2", * username: "exampleuser99", * sshKey: std.file({ * input: "~/.ssh/id_rsa.pub", * }).then(invoke => invoke.result), * labVirtualNetworkId: exampleVirtualNetwork.id, * labSubnetName: exampleVirtualNetwork.subnet.apply(subnet => subnet.name), * storageType: "Premium", * notes: "Some notes about this Virtual Machine.", * galleryImageReference: { * publisher: "Canonical", * offer: "0001-com-ubuntu-server-jammy", * sku: "22_04-lts", * version: "latest", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.DevTestLab` - 2018-09-15 * * ## Import * * Dev Test Linux Virtual Machines can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:devtest/linuxVirtualMachine:LinuxVirtualMachine machine1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/virtualMachines/machine1 * ``` */ export declare class LinuxVirtualMachine extends pulumi.CustomResource { /** * Get an existing LinuxVirtualMachine resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: LinuxVirtualMachineState, opts?: pulumi.CustomResourceOptions): LinuxVirtualMachine; /** * Returns true if the given object is an instance of LinuxVirtualMachine. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is LinuxVirtualMachine; /** * Can this Virtual Machine be claimed by users? Defaults to `true`. */ readonly allowClaim: pulumi.Output; /** * Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created. */ readonly disallowPublicIpAddress: pulumi.Output; /** * The FQDN of the Virtual Machine. */ readonly fqdn: pulumi.Output; /** * A `galleryImageReference` block as defined below. */ readonly galleryImageReference: pulumi.Output; /** * One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created. * * > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`. */ readonly inboundNatRules: pulumi.Output; /** * Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created. */ readonly labName: pulumi.Output; /** * The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created. */ readonly labSubnetName: pulumi.Output; /** * The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created. */ readonly labVirtualNetworkId: pulumi.Output; /** * Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created. * * > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers. */ readonly name: pulumi.Output; /** * Any notes about the Virtual Machine. */ readonly notes: pulumi.Output; /** * The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created. */ readonly password: pulumi.Output; /** * The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created. */ readonly size: pulumi.Output; /** * The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created. * * > **Note:** One or either `password` or `sshKey` must be specified. */ readonly sshKey: pulumi.Output; /** * The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created. */ readonly storageType: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The unique immutable identifier of the Virtual Machine. */ readonly uniqueIdentifier: pulumi.Output; /** * The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created. */ readonly username: pulumi.Output; /** * Create a LinuxVirtualMachine resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: LinuxVirtualMachineArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LinuxVirtualMachine resources. */ export interface LinuxVirtualMachineState { /** * Can this Virtual Machine be claimed by users? Defaults to `true`. */ allowClaim?: pulumi.Input; /** * Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created. */ disallowPublicIpAddress?: pulumi.Input; /** * The FQDN of the Virtual Machine. */ fqdn?: pulumi.Input; /** * A `galleryImageReference` block as defined below. */ galleryImageReference?: pulumi.Input; /** * One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created. * * > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`. */ inboundNatRules?: pulumi.Input[]>; /** * Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created. */ labName?: pulumi.Input; /** * The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created. */ labSubnetName?: pulumi.Input; /** * The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created. */ labVirtualNetworkId?: pulumi.Input; /** * Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created. * * > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers. */ name?: pulumi.Input; /** * Any notes about the Virtual Machine. */ notes?: pulumi.Input; /** * The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created. */ password?: pulumi.Input; /** * The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created. */ size?: pulumi.Input; /** * The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created. * * > **Note:** One or either `password` or `sshKey` must be specified. */ sshKey?: pulumi.Input; /** * The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created. */ storageType?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The unique immutable identifier of the Virtual Machine. */ uniqueIdentifier?: pulumi.Input; /** * The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created. */ username?: pulumi.Input; } /** * The set of arguments for constructing a LinuxVirtualMachine resource. */ export interface LinuxVirtualMachineArgs { /** * Can this Virtual Machine be claimed by users? Defaults to `true`. */ allowClaim?: pulumi.Input; /** * Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created. */ disallowPublicIpAddress?: pulumi.Input; /** * A `galleryImageReference` block as defined below. */ galleryImageReference: pulumi.Input; /** * One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created. * * > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`. */ inboundNatRules?: pulumi.Input[]>; /** * Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created. */ labName: pulumi.Input; /** * The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created. */ labSubnetName: pulumi.Input; /** * The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created. */ labVirtualNetworkId: pulumi.Input; /** * Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created. * * > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers. */ name?: pulumi.Input; /** * Any notes about the Virtual Machine. */ notes?: pulumi.Input; /** * The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created. */ password?: pulumi.Input; /** * The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created. */ size: pulumi.Input; /** * The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created. * * > **Note:** One or either `password` or `sshKey` must be specified. */ sshKey?: pulumi.Input; /** * The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created. */ storageType: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created. */ username: pulumi.Input; }