published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
Deprecated: Use
proxmoxve.storage.Directoryinstead. This resource will be removed in v1.0.
Manages directory-based storage in Proxmox VE.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
const example = new proxmoxve.storage.DirectoryLegacy("example", {
resourceId: "example-dir",
path: "/var/lib/vz",
nodes: ["pve"],
contents: ["images"],
shared: true,
disable: false,
backups: {
maxProtectedBackups: 5,
keepDaily: 7,
},
});
import pulumi
import pulumi_proxmoxve as proxmoxve
example = proxmoxve.storage.DirectoryLegacy("example",
resource_id="example-dir",
path="/var/lib/vz",
nodes=["pve"],
contents=["images"],
shared=True,
disable=False,
backups={
"max_protected_backups": 5,
"keep_daily": 7,
})
package main
import (
"github.com/muhlba91/pulumi-proxmoxve/sdk/v8/go/proxmoxve/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewDirectoryLegacy(ctx, "example", &storage.DirectoryLegacyArgs{
ResourceId: pulumi.String("example-dir"),
Path: pulumi.String("/var/lib/vz"),
Nodes: pulumi.StringArray{
pulumi.String("pve"),
},
Contents: pulumi.StringArray{
pulumi.String("images"),
},
Shared: pulumi.Bool(true),
Disable: pulumi.Bool(false),
Backups: &storage.DirectoryLegacyBackupsArgs{
MaxProtectedBackups: pulumi.Int(5),
KeepDaily: pulumi.Int(7),
},
})
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.Storage.DirectoryLegacy("example", new()
{
ResourceId = "example-dir",
Path = "/var/lib/vz",
Nodes = new[]
{
"pve",
},
Contents = new[]
{
"images",
},
Shared = true,
Disable = false,
Backups = new ProxmoxVE.Storage.Inputs.DirectoryLegacyBackupsArgs
{
MaxProtectedBackups = %!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(5) (example.pp:9,27-28)),
KeepDaily = %!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(7) (example.pp:10,27-28)),
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import io.muehlbachler.pulumi.proxmoxve.storage.DirectoryLegacy;
import io.muehlbachler.pulumi.proxmoxve.storage.DirectoryLegacyArgs;
import com.pulumi.proxmoxve.storage.inputs.DirectoryLegacyBackupsArgs;
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 DirectoryLegacy("example", DirectoryLegacyArgs.builder()
.resourceId("example-dir")
.path("/var/lib/vz")
.nodes("pve")
.contents("images")
.shared(true)
.disable(false)
.backups(DirectoryLegacyBackupsArgs.builder()
.maxProtectedBackups(%!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(5) (example.pp:9,27-28)))
.keepDaily(%!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(7) (example.pp:10,27-28)))
.build())
.build());
}
}
resources:
example:
type: proxmoxve:storage:DirectoryLegacy
properties:
resourceId: example-dir
path: /var/lib/vz
nodes:
- pve
contents:
- images
shared: true
disable: false
backups:
maxProtectedBackups: 5
keepDaily: 7
Create DirectoryLegacy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DirectoryLegacy(name: string, args: DirectoryLegacyArgs, opts?: CustomResourceOptions);@overload
def DirectoryLegacy(resource_name: str,
args: DirectoryLegacyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DirectoryLegacy(resource_name: str,
opts: Optional[ResourceOptions] = None,
path: Optional[str] = None,
resource_id: Optional[str] = None,
backups: Optional[DirectoryLegacyBackupsArgs] = None,
contents: Optional[Sequence[str]] = None,
disable: Optional[bool] = None,
nodes: Optional[Sequence[str]] = None,
preallocation: Optional[str] = None,
shared: Optional[bool] = None)func NewDirectoryLegacy(ctx *Context, name string, args DirectoryLegacyArgs, opts ...ResourceOption) (*DirectoryLegacy, error)public DirectoryLegacy(string name, DirectoryLegacyArgs args, CustomResourceOptions? opts = null)
public DirectoryLegacy(String name, DirectoryLegacyArgs args)
public DirectoryLegacy(String name, DirectoryLegacyArgs args, CustomResourceOptions options)
type: proxmoxve:storage:DirectoryLegacy
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 DirectoryLegacyArgs
- 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 DirectoryLegacyArgs
- 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 DirectoryLegacyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DirectoryLegacyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DirectoryLegacyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DirectoryLegacy 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 DirectoryLegacy resource accepts the following input properties:
- Path string
- The path to the directory on the Proxmox node.
- Resource
Id string - The unique identifier of the storage.
- Backups
Pulumi.
Proxmox VE. Storage. Inputs. Directory Legacy Backups - Configure backup retention settings for the storage type.
- Contents List<string>
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - Disable bool
- Whether the storage is disabled.
- Nodes List<string>
- A list of nodes where this storage is available.
- Preallocation string
- The preallocation mode for raw and qcow2 images.
- bool
- Whether the storage is shared across all nodes.
- Path string
- The path to the directory on the Proxmox node.
- Resource
Id string - The unique identifier of the storage.
- Backups
Directory
Legacy Backups Args - Configure backup retention settings for the storage type.
- Contents []string
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - Disable bool
- Whether the storage is disabled.
- Nodes []string
- A list of nodes where this storage is available.
- Preallocation string
- The preallocation mode for raw and qcow2 images.
- bool
- Whether the storage is shared across all nodes.
- path String
- The path to the directory on the Proxmox node.
- resource
Id String - The unique identifier of the storage.
- backups
Directory
Legacy Backups - Configure backup retention settings for the storage type.
- contents List<String>
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - disable Boolean
- Whether the storage is disabled.
- nodes List<String>
- A list of nodes where this storage is available.
- preallocation String
- The preallocation mode for raw and qcow2 images.
- Boolean
- Whether the storage is shared across all nodes.
- path string
- The path to the directory on the Proxmox node.
- resource
Id string - The unique identifier of the storage.
- backups
Directory
Legacy Backups - Configure backup retention settings for the storage type.
- contents string[]
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - disable boolean
- Whether the storage is disabled.
- nodes string[]
- A list of nodes where this storage is available.
- preallocation string
- The preallocation mode for raw and qcow2 images.
- boolean
- Whether the storage is shared across all nodes.
- path str
- The path to the directory on the Proxmox node.
- resource_
id str - The unique identifier of the storage.
- backups
Directory
Legacy Backups Args - Configure backup retention settings for the storage type.
- contents Sequence[str]
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - disable bool
- Whether the storage is disabled.
- nodes Sequence[str]
- A list of nodes where this storage is available.
- preallocation str
- The preallocation mode for raw and qcow2 images.
- bool
- Whether the storage is shared across all nodes.
- path String
- The path to the directory on the Proxmox node.
- resource
Id String - The unique identifier of the storage.
- backups Property Map
- Configure backup retention settings for the storage type.
- contents List<String>
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - disable Boolean
- Whether the storage is disabled.
- nodes List<String>
- A list of nodes where this storage is available.
- preallocation String
- The preallocation mode for raw and qcow2 images.
- Boolean
- Whether the storage is shared across all nodes.
Outputs
All input properties are implicitly available as output properties. Additionally, the DirectoryLegacy 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 DirectoryLegacy Resource
Get an existing DirectoryLegacy 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?: DirectoryLegacyState, opts?: CustomResourceOptions): DirectoryLegacy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backups: Optional[DirectoryLegacyBackupsArgs] = None,
contents: Optional[Sequence[str]] = None,
disable: Optional[bool] = None,
nodes: Optional[Sequence[str]] = None,
path: Optional[str] = None,
preallocation: Optional[str] = None,
resource_id: Optional[str] = None,
shared: Optional[bool] = None) -> DirectoryLegacyfunc GetDirectoryLegacy(ctx *Context, name string, id IDInput, state *DirectoryLegacyState, opts ...ResourceOption) (*DirectoryLegacy, error)public static DirectoryLegacy Get(string name, Input<string> id, DirectoryLegacyState? state, CustomResourceOptions? opts = null)public static DirectoryLegacy get(String name, Output<String> id, DirectoryLegacyState state, CustomResourceOptions options)resources: _: type: proxmoxve:storage:DirectoryLegacy 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.
- Backups
Pulumi.
Proxmox VE. Storage. Inputs. Directory Legacy Backups - Configure backup retention settings for the storage type.
- Contents List<string>
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - Disable bool
- Whether the storage is disabled.
- Nodes List<string>
- A list of nodes where this storage is available.
- Path string
- The path to the directory on the Proxmox node.
- Preallocation string
- The preallocation mode for raw and qcow2 images.
- Resource
Id string - The unique identifier of the storage.
- bool
- Whether the storage is shared across all nodes.
- Backups
Directory
Legacy Backups Args - Configure backup retention settings for the storage type.
- Contents []string
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - Disable bool
- Whether the storage is disabled.
- Nodes []string
- A list of nodes where this storage is available.
- Path string
- The path to the directory on the Proxmox node.
- Preallocation string
- The preallocation mode for raw and qcow2 images.
- Resource
Id string - The unique identifier of the storage.
- bool
- Whether the storage is shared across all nodes.
- backups
Directory
Legacy Backups - Configure backup retention settings for the storage type.
- contents List<String>
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - disable Boolean
- Whether the storage is disabled.
- nodes List<String>
- A list of nodes where this storage is available.
- path String
- The path to the directory on the Proxmox node.
- preallocation String
- The preallocation mode for raw and qcow2 images.
- resource
Id String - The unique identifier of the storage.
- Boolean
- Whether the storage is shared across all nodes.
- backups
Directory
Legacy Backups - Configure backup retention settings for the storage type.
- contents string[]
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - disable boolean
- Whether the storage is disabled.
- nodes string[]
- A list of nodes where this storage is available.
- path string
- The path to the directory on the Proxmox node.
- preallocation string
- The preallocation mode for raw and qcow2 images.
- resource
Id string - The unique identifier of the storage.
- boolean
- Whether the storage is shared across all nodes.
- backups
Directory
Legacy Backups Args - Configure backup retention settings for the storage type.
- contents Sequence[str]
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - disable bool
- Whether the storage is disabled.
- nodes Sequence[str]
- A list of nodes where this storage is available.
- path str
- The path to the directory on the Proxmox node.
- preallocation str
- The preallocation mode for raw and qcow2 images.
- resource_
id str - The unique identifier of the storage.
- bool
- Whether the storage is shared across all nodes.
- backups Property Map
- Configure backup retention settings for the storage type.
- contents List<String>
- The content types that can be stored on this storage. Valid values:
backup(VM backups),images(VM disk images),import(VM disk images for import),iso(ISO images),rootdir(container root directories),snippets(cloud-init, hook scripts, etc.),vztmpl(container templates). - disable Boolean
- Whether the storage is disabled.
- nodes List<String>
- A list of nodes where this storage is available.
- path String
- The path to the directory on the Proxmox node.
- preallocation String
- The preallocation mode for raw and qcow2 images.
- resource
Id String - The unique identifier of the storage.
- Boolean
- Whether the storage is shared across all nodes.
Supporting Types
DirectoryLegacyBackups, DirectoryLegacyBackupsArgs
- Keep
All bool - Specifies if all backups should be kept, regardless of their age. When set to true, other keep_* attributes must not be set.
- Keep
Daily int - The number of daily backups to keep. Older backups will be removed.
- Keep
Hourly int - The number of hourly backups to keep. Older backups will be removed.
- Keep
Last int - Specifies the number of the most recent backups to keep, regardless of their age.
- Keep
Monthly int - The number of monthly backups to keep. Older backups will be removed.
- Keep
Weekly int - The number of weekly backups to keep. Older backups will be removed.
- Keep
Yearly int - The number of yearly backups to keep. Older backups will be removed.
- Max
Protected intBackups - The maximum number of protected backups per guest. Use '-1' for unlimited.
- Keep
All bool - Specifies if all backups should be kept, regardless of their age. When set to true, other keep_* attributes must not be set.
- Keep
Daily int - The number of daily backups to keep. Older backups will be removed.
- Keep
Hourly int - The number of hourly backups to keep. Older backups will be removed.
- Keep
Last int - Specifies the number of the most recent backups to keep, regardless of their age.
- Keep
Monthly int - The number of monthly backups to keep. Older backups will be removed.
- Keep
Weekly int - The number of weekly backups to keep. Older backups will be removed.
- Keep
Yearly int - The number of yearly backups to keep. Older backups will be removed.
- Max
Protected intBackups - The maximum number of protected backups per guest. Use '-1' for unlimited.
- keep
All Boolean - Specifies if all backups should be kept, regardless of their age. When set to true, other keep_* attributes must not be set.
- keep
Daily Integer - The number of daily backups to keep. Older backups will be removed.
- keep
Hourly Integer - The number of hourly backups to keep. Older backups will be removed.
- keep
Last Integer - Specifies the number of the most recent backups to keep, regardless of their age.
- keep
Monthly Integer - The number of monthly backups to keep. Older backups will be removed.
- keep
Weekly Integer - The number of weekly backups to keep. Older backups will be removed.
- keep
Yearly Integer - The number of yearly backups to keep. Older backups will be removed.
- max
Protected IntegerBackups - The maximum number of protected backups per guest. Use '-1' for unlimited.
- keep
All boolean - Specifies if all backups should be kept, regardless of their age. When set to true, other keep_* attributes must not be set.
- keep
Daily number - The number of daily backups to keep. Older backups will be removed.
- keep
Hourly number - The number of hourly backups to keep. Older backups will be removed.
- keep
Last number - Specifies the number of the most recent backups to keep, regardless of their age.
- keep
Monthly number - The number of monthly backups to keep. Older backups will be removed.
- keep
Weekly number - The number of weekly backups to keep. Older backups will be removed.
- keep
Yearly number - The number of yearly backups to keep. Older backups will be removed.
- max
Protected numberBackups - The maximum number of protected backups per guest. Use '-1' for unlimited.
- keep_
all bool - Specifies if all backups should be kept, regardless of their age. When set to true, other keep_* attributes must not be set.
- keep_
daily int - The number of daily backups to keep. Older backups will be removed.
- keep_
hourly int - The number of hourly backups to keep. Older backups will be removed.
- keep_
last int - Specifies the number of the most recent backups to keep, regardless of their age.
- keep_
monthly int - The number of monthly backups to keep. Older backups will be removed.
- keep_
weekly int - The number of weekly backups to keep. Older backups will be removed.
- keep_
yearly int - The number of yearly backups to keep. Older backups will be removed.
- max_
protected_ intbackups - The maximum number of protected backups per guest. Use '-1' for unlimited.
- keep
All Boolean - Specifies if all backups should be kept, regardless of their age. When set to true, other keep_* attributes must not be set.
- keep
Daily Number - The number of daily backups to keep. Older backups will be removed.
- keep
Hourly Number - The number of hourly backups to keep. Older backups will be removed.
- keep
Last Number - Specifies the number of the most recent backups to keep, regardless of their age.
- keep
Monthly Number - The number of monthly backups to keep. Older backups will be removed.
- keep
Weekly Number - The number of weekly backups to keep. Older backups will be removed.
- keep
Yearly Number - The number of yearly backups to keep. Older backups will be removed.
- max
Protected NumberBackups - The maximum number of protected backups per guest. Use '-1' for unlimited.
Import
!/usr/bin/env sh Storage can be imported using its identifier, e.g.:
$ pulumi import proxmoxve:storage/directoryLegacy:DirectoryLegacy example local-dir
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
proxmoxTerraform Provider.
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
