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

    Manages the host entries on a specific node.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    const firstNodeHostEntries = new proxmoxve.HostsLegacy("first_node_host_entries", {
        nodeName: "first-node",
        entries: [{
            address: "127.0.0.1",
            hostnames: [
                "localhost",
                "localhost.localdomain",
            ],
        }],
    });
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    first_node_host_entries = proxmoxve.HostsLegacy("first_node_host_entries",
        node_name="first-node",
        entries=[{
            "address": "127.0.0.1",
            "hostnames": [
                "localhost",
                "localhost.localdomain",
            ],
        }])
    
    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.NewHostsLegacy(ctx, "first_node_host_entries", &proxmoxve.HostsLegacyArgs{
    			NodeName: pulumi.String("first-node"),
    			Entries: []map[string]interface{}{
    				map[string]interface{}{
    					"address": "127.0.0.1",
    					"hostnames": []string{
    						"localhost",
    						"localhost.localdomain",
    					},
    				},
    			},
    		})
    		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 = new ProxmoxVE.Index.HostsLegacy("first_node_host_entries", new()
        {
            NodeName = "first-node",
            Entries = new[]
            {
                new ProxmoxVE.Inputs.HostsLegacyEntryArgs
                {
                    Address = "127.0.0.1",
                    Hostnames = new[]
                    {
                        "localhost",
                        "localhost.localdomain",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import io.muehlbachler.pulumi.proxmoxve.HostsLegacy;
    import io.muehlbachler.pulumi.proxmoxve.HostsLegacyArgs;
    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) {
            var firstNodeHostEntries = new HostsLegacy("firstNodeHostEntries", HostsLegacyArgs.builder()
                .nodeName("first-node")
                .entries(List.of(Map.ofEntries(
                    Map.entry("address", "127.0.0.1"),
                    Map.entry("hostnames", List.of(                
                        "localhost",
                        "localhost.localdomain"))
                )))
                .build());
    
        }
    }
    
    resources:
      firstNodeHostEntries:
        type: proxmoxve:HostsLegacy
        name: first_node_host_entries
        properties:
          nodeName: first-node
          entries:
            - address: 127.0.0.1
              hostnames:
                - localhost
                - localhost.localdomain
    

    Create HostsLegacy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new HostsLegacy(name: string, args: HostsLegacyArgs, opts?: CustomResourceOptions);
    @overload
    def HostsLegacy(resource_name: str,
                    args: HostsLegacyArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def HostsLegacy(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    entry: Optional[Sequence[HostsLegacyEntryArgs]] = None,
                    node_name: Optional[str] = None)
    func NewHostsLegacy(ctx *Context, name string, args HostsLegacyArgs, opts ...ResourceOption) (*HostsLegacy, error)
    public HostsLegacy(string name, HostsLegacyArgs args, CustomResourceOptions? opts = null)
    public HostsLegacy(String name, HostsLegacyArgs args)
    public HostsLegacy(String name, HostsLegacyArgs args, CustomResourceOptions options)
    
    type: proxmoxve:HostsLegacy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args HostsLegacyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args HostsLegacyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args HostsLegacyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HostsLegacyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HostsLegacyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var hostsLegacyResource = new ProxmoxVE.Index.HostsLegacy("hostsLegacyResource", new()
    {
        Entry = new[]
        {
            new ProxmoxVE.Inputs.HostsLegacyEntryArgs
            {
                Address = "string",
                Hostnames = new[]
                {
                    "string",
                },
            },
        },
        NodeName = "string",
    });
    
    example, err := proxmoxve.NewHostsLegacy(ctx, "hostsLegacyResource", &proxmoxve.HostsLegacyArgs{
    	Entry: proxmoxve.HostsLegacyEntryArray{
    		&proxmoxve.HostsLegacyEntryArgs{
    			Address: pulumi.String("string"),
    			Hostnames: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	NodeName: pulumi.String("string"),
    })
    
    var hostsLegacyResource = new HostsLegacy("hostsLegacyResource", HostsLegacyArgs.builder()
        .entry(HostsLegacyEntryArgs.builder()
            .address("string")
            .hostnames("string")
            .build())
        .nodeName("string")
        .build());
    
    hosts_legacy_resource = proxmoxve.HostsLegacy("hostsLegacyResource",
        entry=[{
            "address": "string",
            "hostnames": ["string"],
        }],
        node_name="string")
    
    const hostsLegacyResource = new proxmoxve.HostsLegacy("hostsLegacyResource", {
        entry: [{
            address: "string",
            hostnames: ["string"],
        }],
        nodeName: "string",
    });
    
    type: proxmoxve:HostsLegacy
    properties:
        entry:
            - address: string
              hostnames:
                - string
        nodeName: string
    

    HostsLegacy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The HostsLegacy resource accepts the following input properties:

    Entry List<Pulumi.ProxmoxVE.Inputs.HostsLegacyEntry>
    A host entry (multiple blocks supported).
    NodeName string
    A node name.
    Entry []HostsLegacyEntryArgs
    A host entry (multiple blocks supported).
    NodeName string
    A node name.
    entry List<HostsLegacyEntry>
    A host entry (multiple blocks supported).
    nodeName String
    A node name.
    entry HostsLegacyEntry[]
    A host entry (multiple blocks supported).
    nodeName string
    A node name.
    entry Sequence[HostsLegacyEntryArgs]
    A host entry (multiple blocks supported).
    node_name str
    A node name.
    entry List<Property Map>
    A host entry (multiple blocks supported).
    nodeName String
    A node name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the HostsLegacy resource produces the following output properties:

    Addresses List<string>
    The IP addresses.
    Digest string
    The SHA1 digest.
    Entries List<Pulumi.ProxmoxVE.Outputs.HostsLegacyEntry>
    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.
    Addresses []string
    The IP addresses.
    Digest string
    The SHA1 digest.
    Entries []HostsLegacyEntry
    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.
    addresses List<String>
    The IP addresses.
    digest String
    The SHA1 digest.
    entries List<HostsLegacyEntry>
    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.
    addresses string[]
    The IP addresses.
    digest string
    The SHA1 digest.
    entries HostsLegacyEntry[]
    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.
    addresses Sequence[str]
    The IP addresses.
    digest str
    The SHA1 digest.
    entries Sequence[HostsLegacyEntry]
    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.
    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.

    Look up Existing HostsLegacy Resource

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

    public static get(name: string, id: Input<ID>, state?: HostsLegacyState, opts?: CustomResourceOptions): HostsLegacy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            addresses: Optional[Sequence[str]] = None,
            digest: Optional[str] = None,
            entries: Optional[Sequence[HostsLegacyEntryArgs]] = None,
            entry: Optional[Sequence[HostsLegacyEntryArgs]] = None,
            hostnames: Optional[Sequence[Sequence[str]]] = None,
            node_name: Optional[str] = None) -> HostsLegacy
    func GetHostsLegacy(ctx *Context, name string, id IDInput, state *HostsLegacyState, opts ...ResourceOption) (*HostsLegacy, error)
    public static HostsLegacy Get(string name, Input<string> id, HostsLegacyState? state, CustomResourceOptions? opts = null)
    public static HostsLegacy get(String name, Output<String> id, HostsLegacyState state, CustomResourceOptions options)
    resources:  _:    type: proxmoxve:HostsLegacy    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Addresses List<string>
    The IP addresses.
    Digest string
    The SHA1 digest.
    Entries List<Pulumi.ProxmoxVE.Inputs.HostsLegacyEntry>
    The host entries (conversion of addresses and hostnames into objects).
    Entry List<Pulumi.ProxmoxVE.Inputs.HostsLegacyEntry>
    A host entry (multiple blocks supported).
    Hostnames List<ImmutableArray<string>>
    The hostnames associated with each of the IP addresses.
    NodeName string
    A node name.
    Addresses []string
    The IP addresses.
    Digest string
    The SHA1 digest.
    Entries []HostsLegacyEntryArgs
    The host entries (conversion of addresses and hostnames into objects).
    Entry []HostsLegacyEntryArgs
    A host entry (multiple blocks supported).
    Hostnames [][]string
    The hostnames associated with each of the IP addresses.
    NodeName string
    A node name.
    addresses List<String>
    The IP addresses.
    digest String
    The SHA1 digest.
    entries List<HostsLegacyEntry>
    The host entries (conversion of addresses and hostnames into objects).
    entry List<HostsLegacyEntry>
    A host entry (multiple blocks supported).
    hostnames List<List<String>>
    The hostnames associated with each of the IP addresses.
    nodeName String
    A node name.
    addresses string[]
    The IP addresses.
    digest string
    The SHA1 digest.
    entries HostsLegacyEntry[]
    The host entries (conversion of addresses and hostnames into objects).
    entry HostsLegacyEntry[]
    A host entry (multiple blocks supported).
    hostnames string[][]
    The hostnames associated with each of the IP addresses.
    nodeName string
    A node name.
    addresses Sequence[str]
    The IP addresses.
    digest str
    The SHA1 digest.
    entries Sequence[HostsLegacyEntryArgs]
    The host entries (conversion of addresses and hostnames into objects).
    entry Sequence[HostsLegacyEntryArgs]
    A host entry (multiple blocks supported).
    hostnames Sequence[Sequence[str]]
    The hostnames associated with each of the IP addresses.
    node_name str
    A node name.
    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).
    entry List<Property Map>
    A host entry (multiple blocks supported).
    hostnames List<List<String>>
    The hostnames associated with each of the IP addresses.
    nodeName String
    A node name.

    Supporting Types

    HostsLegacyEntry, HostsLegacyEntryArgs

    Address string
    The IP address.
    Hostnames List<string>
    The hostnames.
    Address string
    The IP address.
    Hostnames []string
    The hostnames.
    address String
    The IP address.
    hostnames List<String>
    The hostnames.
    address string
    The IP address.
    hostnames string[]
    The hostnames.
    address str
    The IP address.
    hostnames Sequence[str]
    The hostnames.
    address String
    The IP address.
    hostnames List<String>
    The hostnames.

    Import

    ant Notes

    Be careful not to use this resource multiple times for the same node.

    To learn more about importing existing cloud resources, see Importing resources.

    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.0.0
    published on Sunday, Apr 5, 2026 by Daniel Muehlbachler-Pietrzykowski
      Try Pulumi Cloud free. Your team will thank you.