1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. Hardware
  5. Hardware/mapping
  6. Dir
Proxmox Virtual Environment (Proxmox VE) v7.1.0 published on Saturday, May 24, 2025 by Daniel Muehlbachler-Pietrzykowski

proxmoxve.Hardware/mapping.Dir

Explore with Pulumi AI

proxmoxve logo
Proxmox Virtual Environment (Proxmox VE) v7.1.0 published on Saturday, May 24, 2025 by Daniel Muehlbachler-Pietrzykowski

    Manages a directory mapping in a Proxmox VE cluster.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    const example = new proxmoxve.hardware.mapping.Dir("example", {
        comment: "This is a comment",
        maps: [{
            node: "pve",
            path: "/mnt/data",
        }],
    });
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    example = proxmoxve.hardware.mapping.Dir("example",
        comment="This is a comment",
        maps=[{
            "node": "pve",
            "path": "/mnt/data",
        }])
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v7/go/proxmoxve/hardware"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hardware.NewDir(ctx, "example", &hardware.DirArgs{
    			Comment: pulumi.String("This is a comment"),
    			Maps: mapping.DirMapTypeArray{
    				&mapping.DirMapTypeArgs{
    					Node: pulumi.String("pve"),
    					Path: pulumi.String("/mnt/data"),
    				},
    			},
    		})
    		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 example = new ProxmoxVE.Hardware.Mapping.Dir("example", new()
        {
            Comment = "This is a comment",
            Maps = new[]
            {
                new ProxmoxVE.Hardware.Mapping.Inputs.DirMapArgs
                {
                    Node = "pve",
                    Path = "/mnt/data",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import io.muehlbachler.pulumi.proxmoxve.Hardware.Dir;
    import io.muehlbachler.pulumi.proxmoxve.Hardware.DirArgs;
    import com.pulumi.proxmoxve.Hardware.inputs.DirMapArgs;
    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 example = new Dir("example", DirArgs.builder()
                .comment("This is a comment")
                .maps(DirMapArgs.builder()
                    .node("pve")
                    .path("/mnt/data")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: proxmoxve:Hardware/mapping:Dir
        properties:
          comment: This is a comment
          # The actual map of devices.
          maps:
            - node: pve
              path: /mnt/data
    

    Create Dir Resource

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

    Constructor syntax

    new Dir(name: string, args: DirArgs, opts?: CustomResourceOptions);
    @overload
    def Dir(resource_name: str,
            args: DirArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Dir(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            maps: Optional[Sequence[DirMapArgs]] = None,
            comment: Optional[str] = None,
            name: Optional[str] = None)
    func NewDir(ctx *Context, name string, args DirArgs, opts ...ResourceOption) (*Dir, error)
    public Dir(string name, DirArgs args, CustomResourceOptions? opts = null)
    public Dir(String name, DirArgs args)
    public Dir(String name, DirArgs args, CustomResourceOptions options)
    
    type: proxmoxve:Hardware/mapping/dir:Dir
    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 DirArgs
    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 DirArgs
    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 DirArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DirArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DirArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Dir 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 Dir resource accepts the following input properties:

    Maps List<Pulumi.ProxmoxVE.Hardware.Mapping.Inputs.DirMap>
    The actual map of devices for the hardware mapping.
    Comment string
    The comment of this directory mapping.
    Name string
    The name of this directory mapping.
    Maps []DirMapTypeArgs
    The actual map of devices for the hardware mapping.
    Comment string
    The comment of this directory mapping.
    Name string
    The name of this directory mapping.
    maps List<DirMap>
    The actual map of devices for the hardware mapping.
    comment String
    The comment of this directory mapping.
    name String
    The name of this directory mapping.
    maps DirMap[]
    The actual map of devices for the hardware mapping.
    comment string
    The comment of this directory mapping.
    name string
    The name of this directory mapping.
    maps Sequence[DirMapArgs]
    The actual map of devices for the hardware mapping.
    comment str
    The comment of this directory mapping.
    name str
    The name of this directory mapping.
    maps List<Property Map>
    The actual map of devices for the hardware mapping.
    comment String
    The comment of this directory mapping.
    name String
    The name of this directory mapping.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Dir Resource

    Get an existing Dir 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?: DirState, opts?: CustomResourceOptions): Dir
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            maps: Optional[Sequence[DirMapArgs]] = None,
            name: Optional[str] = None) -> Dir
    func GetDir(ctx *Context, name string, id IDInput, state *DirState, opts ...ResourceOption) (*Dir, error)
    public static Dir Get(string name, Input<string> id, DirState? state, CustomResourceOptions? opts = null)
    public static Dir get(String name, Output<String> id, DirState state, CustomResourceOptions options)
    resources:  _:    type: proxmoxve:Hardware/mapping/dir:Dir    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:
    Comment string
    The comment of this directory mapping.
    Maps List<Pulumi.ProxmoxVE.Hardware.Mapping.Inputs.DirMap>
    The actual map of devices for the hardware mapping.
    Name string
    The name of this directory mapping.
    Comment string
    The comment of this directory mapping.
    Maps []DirMapTypeArgs
    The actual map of devices for the hardware mapping.
    Name string
    The name of this directory mapping.
    comment String
    The comment of this directory mapping.
    maps List<DirMap>
    The actual map of devices for the hardware mapping.
    name String
    The name of this directory mapping.
    comment string
    The comment of this directory mapping.
    maps DirMap[]
    The actual map of devices for the hardware mapping.
    name string
    The name of this directory mapping.
    comment str
    The comment of this directory mapping.
    maps Sequence[DirMapArgs]
    The actual map of devices for the hardware mapping.
    name str
    The name of this directory mapping.
    comment String
    The comment of this directory mapping.
    maps List<Property Map>
    The actual map of devices for the hardware mapping.
    name String
    The name of this directory mapping.

    Supporting Types

    DirMap, DirMapArgs

    Node string
    The node this mapping applies to.
    Path string
    The path of the map. For directory mappings the path is required and refers to the POSIX path of the directory as visible from the node.
    Node string
    The node this mapping applies to.
    Path string
    The path of the map. For directory mappings the path is required and refers to the POSIX path of the directory as visible from the node.
    node String
    The node this mapping applies to.
    path String
    The path of the map. For directory mappings the path is required and refers to the POSIX path of the directory as visible from the node.
    node string
    The node this mapping applies to.
    path string
    The path of the map. For directory mappings the path is required and refers to the POSIX path of the directory as visible from the node.
    node str
    The node this mapping applies to.
    path str
    The path of the map. For directory mappings the path is required and refers to the POSIX path of the directory as visible from the node.
    node String
    The node this mapping applies to.
    path String
    The path of the map. For directory mappings the path is required and refers to the POSIX path of the directory as visible from the node.

    Import

    #!/usr/bin/env sh

    A directory mapping can be imported using their name, e.g.:

    $ pulumi import proxmoxve:Hardware/mapping/dir:Dir example example
    

    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
    Proxmox Virtual Environment (Proxmox VE) v7.1.0 published on Saturday, May 24, 2025 by Daniel Muehlbachler-Pietrzykowski