1. Packages
  2. Packages
  3. Proxmox Virtual Environment (Proxmox VE)
  4. API Docs
  5. getHostsLegacy
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.1.0
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
proxmoxve logo
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.1.0
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski

    Retrieves all the host entries from a specific node.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    const firstNodeHostEntries = proxmoxve.getHostsLegacy({
        nodeName: "first-node",
    });
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    first_node_host_entries = proxmoxve.get_hosts_legacy(node_name="first-node")
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v8/go/proxmoxve"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := proxmoxve.GetHostsLegacy(ctx, &proxmoxve.LookupHostsLegacyArgs{
    			NodeName: "first-node",
    		}, 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 firstNodeHostEntries = ProxmoxVE.Index.GetHostsLegacy.Invoke(new()
        {
            NodeName = "first-node",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.proxmoxve.ProxmoxveFunctions;
    import com.pulumi.proxmoxve.inputs.GetHostsLegacyArgs;
    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 firstNodeHostEntries = ProxmoxveFunctions.getHostsLegacy(GetHostsLegacyArgs.builder()
                .nodeName("first-node")
                .build());
    
        }
    }
    
    variables:
      firstNodeHostEntries:
        fn::invoke:
          function: proxmoxve:getHostsLegacy
          arguments:
            nodeName: first-node
    
    Example coming soon!
    

    Using getHostsLegacy

    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 getHostsLegacy(args: GetHostsLegacyArgs, opts?: InvokeOptions): Promise<GetHostsLegacyResult>
    function getHostsLegacyOutput(args: GetHostsLegacyOutputArgs, opts?: InvokeOptions): Output<GetHostsLegacyResult>
    def get_hosts_legacy(node_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetHostsLegacyResult
    def get_hosts_legacy_output(node_name: pulumi.Input[Optional[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetHostsLegacyResult]
    func LookupHostsLegacy(ctx *Context, args *LookupHostsLegacyArgs, opts ...InvokeOption) (*LookupHostsLegacyResult, error)
    func LookupHostsLegacyOutput(ctx *Context, args *LookupHostsLegacyOutputArgs, opts ...InvokeOption) LookupHostsLegacyResultOutput

    > Note: This function is named LookupHostsLegacy in the Go SDK.

    public static class GetHostsLegacy 
    {
        public static Task<GetHostsLegacyResult> InvokeAsync(GetHostsLegacyArgs args, InvokeOptions? opts = null)
        public static Output<GetHostsLegacyResult> Invoke(GetHostsLegacyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetHostsLegacyResult> getHostsLegacy(GetHostsLegacyArgs args, InvokeOptions options)
    public static Output<GetHostsLegacyResult> getHostsLegacy(GetHostsLegacyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: proxmoxve:index/getHostsLegacy:getHostsLegacy
      arguments:
        # arguments dictionary
    data "proxmoxve_gethostslegacy" "name" {
        # arguments
    }

    The following arguments are supported:

    NodeName string
    A node name.
    NodeName string
    A node name.
    node_name string
    A node name.
    nodeName String
    A node name.
    nodeName string
    A node name.
    node_name str
    A node name.
    nodeName String
    A node name.

    getHostsLegacy Result

    The following output properties are available:

    Addresses List<string>
    The IP addresses.
    Digest string
    The SHA1 digest.
    Entries List<Pulumi.ProxmoxVE.Outputs.GetHostsLegacyEntry>
    The host entries (conversion of addresses and hostnames into objects).
    Hostnames List<ImmutableArray<string>>
    The hostnames associated with each of the IP addresses.
    Id string
    The provider-assigned unique ID for this managed resource.
    NodeName string
    Addresses []string
    The IP addresses.
    Digest string
    The SHA1 digest.
    Entries []GetHostsLegacyEntry
    The host entries (conversion of addresses and hostnames into objects).
    Hostnames [][]string
    The hostnames associated with each of the IP addresses.
    Id string
    The provider-assigned unique ID for this managed resource.
    NodeName string
    addresses list(string)
    The IP addresses.
    digest string
    The SHA1 digest.
    entries list(object)
    The host entries (conversion of addresses and hostnames into objects).
    hostnames list(list(string))
    The hostnames associated with each of the IP addresses.
    id string
    The provider-assigned unique ID for this managed resource.
    node_name string
    addresses List<String>
    The IP addresses.
    digest String
    The SHA1 digest.
    entries List<GetHostsLegacyEntry>
    The host entries (conversion of addresses and hostnames into objects).
    hostnames List<List<String>>
    The hostnames associated with each of the IP addresses.
    id String
    The provider-assigned unique ID for this managed resource.
    nodeName String
    addresses string[]
    The IP addresses.
    digest string
    The SHA1 digest.
    entries GetHostsLegacyEntry[]
    The host entries (conversion of addresses and hostnames into objects).
    hostnames string[][]
    The hostnames associated with each of the IP addresses.
    id string
    The provider-assigned unique ID for this managed resource.
    nodeName string
    addresses Sequence[str]
    The IP addresses.
    digest str
    The SHA1 digest.
    entries Sequence[GetHostsLegacyEntry]
    The host entries (conversion of addresses and hostnames into objects).
    hostnames Sequence[Sequence[str]]
    The hostnames associated with each of the IP addresses.
    id str
    The provider-assigned unique ID for this managed resource.
    node_name str
    addresses List<String>
    The IP addresses.
    digest String
    The SHA1 digest.
    entries List<Property Map>
    The host entries (conversion of addresses and hostnames into objects).
    hostnames List<List<String>>
    The hostnames associated with each of the IP addresses.
    id String
    The provider-assigned unique ID for this managed resource.
    nodeName String

    Supporting Types

    GetHostsLegacyEntry

    Address string
    The address
    Hostnames List<string>
    The hostnames associated with each of the IP addresses.
    Address string
    The address
    Hostnames []string
    The hostnames associated with each of the IP addresses.
    address string
    The address
    hostnames list(string)
    The hostnames associated with each of the IP addresses.
    address String
    The address
    hostnames List<String>
    The hostnames associated with each of the IP addresses.
    address string
    The address
    hostnames string[]
    The hostnames associated with each of the IP addresses.
    address str
    The address
    hostnames Sequence[str]
    The hostnames associated with each of the IP addresses.
    address String
    The address
    hostnames List<String>
    The hostnames associated with each of the IP addresses.

    Package Details

    Repository
    proxmoxve muhlba91/pulumi-proxmoxve
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the proxmox Terraform Provider.
    proxmoxve logo
    Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.1.0
    published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
      Try Pulumi Cloud free. Your team will thank you.