Resource: proxmox_virtual_environment_storage_directory¶
Warning
Deprecated: Use proxmox_storage_directory instead. This resource will be removed in v1.0.
Manages directory-based storage in Proxmox VE.
Example Usage¶
resource "proxmox_virtual_environment_storage_directory" "example" {
id = "example-dir"
path = "/var/lib/vz"
nodes = ["pve"]
content = ["images"]
shared = true
disable = false
backups {
max_protected_backups = 5
keep_daily = 7
}
}
Schema¶
Required¶
id(String) The unique identifier of the storage.path(String) The path to the directory on the Proxmox node.
Optional¶
backups(Block, Optional) Configure backup retention settings for the storage type. (see below for nested schema)content(Set of 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(Set of String) A list of nodes where this storage is available.preallocation(String) The preallocation mode for raw and qcow2 images.shared(Boolean) Whether the storage is shared across all nodes.
Nested Schema for backups¶
Optional:
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_backups(Number) The maximum number of protected backups per guest. Use '-1' for unlimited.