Proxmox Virtual Environment (Proxmox VE) v6.10.1 published on Friday, Jun 28, 2024 by Daniel Muehlbachler-Pietrzykowski
proxmoxve.VM.getVirtualMachines
Explore with Pulumi AI

Proxmox Virtual Environment (Proxmox VE) v6.10.1 published on Friday, Jun 28, 2024 by Daniel Muehlbachler-Pietrzykowski
Retrieves information about all VMs in the Proxmox cluster.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as proxmoxve from "@pulumi/proxmoxve";
const ubuntuVms = proxmoxve.VM.getVirtualMachines({
tags: ["ubuntu"],
});
import pulumi
import pulumi_proxmoxve as proxmoxve
ubuntu_vms = proxmoxve.VM.get_virtual_machines(tags=["ubuntu"])
package main
import (
"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve/VM"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := VM.GetVirtualMachines(ctx, &vm.GetVirtualMachinesArgs{
Tags: []string{
"ubuntu",
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ProxmoxVE = Pulumi.ProxmoxVE;
return await Deployment.RunAsync(() =>
{
var ubuntuVms = ProxmoxVE.VM.GetVirtualMachines.Invoke(new()
{
Tags = new[]
{
"ubuntu",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.proxmoxve.VM.VMFunctions;
import com.pulumi.proxmoxve.VM.inputs.GetVirtualMachinesArgs;
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 ubuntuVms = VMFunctions.getVirtualMachines(GetVirtualMachinesArgs.builder()
.tags("ubuntu")
.build());
}
}
variables:
ubuntuVms:
fn::invoke:
Function: proxmoxve:VM:getVirtualMachines
Arguments:
tags:
- ubuntu
Using getVirtualMachines
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVirtualMachines(args: GetVirtualMachinesArgs, opts?: InvokeOptions): Promise<GetVirtualMachinesResult>
function getVirtualMachinesOutput(args: GetVirtualMachinesOutputArgs, opts?: InvokeOptions): Output<GetVirtualMachinesResult>
def get_virtual_machines(node_name: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetVirtualMachinesResult
def get_virtual_machines_output(node_name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVirtualMachinesResult]
func GetVirtualMachines(ctx *Context, args *GetVirtualMachinesArgs, opts ...InvokeOption) (*GetVirtualMachinesResult, error)
func GetVirtualMachinesOutput(ctx *Context, args *GetVirtualMachinesOutputArgs, opts ...InvokeOption) GetVirtualMachinesResultOutput
> Note: This function is named GetVirtualMachines
in the Go SDK.
public static class GetVirtualMachines
{
public static Task<GetVirtualMachinesResult> InvokeAsync(GetVirtualMachinesArgs args, InvokeOptions? opts = null)
public static Output<GetVirtualMachinesResult> Invoke(GetVirtualMachinesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVirtualMachinesResult> getVirtualMachines(GetVirtualMachinesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: proxmoxve:VM/getVirtualMachines:getVirtualMachines
arguments:
# arguments dictionary
The following arguments are supported:
- Node
Name string - The node name.
- List<string>
- A list of tags to filter the VMs. The VM must have all the tags to be included in the result.
- Node
Name string - The node name.
- []string
- A list of tags to filter the VMs. The VM must have all the tags to be included in the result.
- node
Name String - The node name.
- List<String>
- A list of tags to filter the VMs. The VM must have all the tags to be included in the result.
- node
Name string - The node name.
- string[]
- A list of tags to filter the VMs. The VM must have all the tags to be included in the result.
- node_
name str - The node name.
- Sequence[str]
- A list of tags to filter the VMs. The VM must have all the tags to be included in the result.
- node
Name String - The node name.
- List<String>
- A list of tags to filter the VMs. The VM must have all the tags to be included in the result.
getVirtualMachines Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Vms
List<Pulumi.
Proxmox VE. VM. Outputs. Get Virtual Machines Vm> - The VMs list.
- Node
Name string - The node name.
- List<string>
- A list of tags of the VM.
- Id string
- The provider-assigned unique ID for this managed resource.
- Vms
[]Get
Virtual Machines Vm - The VMs list.
- Node
Name string - The node name.
- []string
- A list of tags of the VM.
- id String
- The provider-assigned unique ID for this managed resource.
- vms
List<Get
Virtual Machines Vm> - The VMs list.
- node
Name String - The node name.
- List<String>
- A list of tags of the VM.
- id string
- The provider-assigned unique ID for this managed resource.
- vms
Get
Virtual Machines Vm[] - The VMs list.
- node
Name string - The node name.
- string[]
- A list of tags of the VM.
- id str
- The provider-assigned unique ID for this managed resource.
- vms
Sequence[vm.
Get Virtual Machines Vm] - The VMs list.
- node_
name str - The node name.
- Sequence[str]
- A list of tags of the VM.
- id String
- The provider-assigned unique ID for this managed resource.
- vms List<Property Map>
- The VMs list.
- node
Name String - The node name.
- List<String>
- A list of tags of the VM.
Supporting Types
GetVirtualMachinesVm
Package Details
- Repository
- proxmoxve muhlba91/pulumi-proxmoxve
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
proxmox
Terraform Provider.

Proxmox Virtual Environment (Proxmox VE) v6.10.1 published on Friday, Jun 28, 2024 by Daniel Muehlbachler-Pietrzykowski