Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guides/setup-proxmox-for-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ Goal is to have a proxmox node in VM using <https://virt-manager.org/> for a job

10. Now you can run `make example`.

11. If you see error with proxmox_virtual_environment_file: the datastore "local" does not support content type "snippets"; supported content types are: `[backup, iso, vztmpl]`, you need to enable them, see <https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_file#snippets>.
11. If you see error with proxmox_virtual_environment_file: the datastore "local" does not support content type "snippets"; supported content types are: `[backup, images, iso, rootdir, vztmpl]`, you need to enable them, see <https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_file#snippets>.
2 changes: 2 additions & 0 deletions docs/resources/virtual_environment_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ resource "proxmox_virtual_environment_file" "ubuntu_container_template" {
- `content_type` - (Optional) The content type. If not specified, the content
type will be inferred from the file extension. Valid values are:
- `backup` (allowed extensions: `.vzdump`, `.tar.gz`, `.tar.xz`, `tar.zst`)
- `images` (allowed extensions: `.qcow2`, `.raw`, `.vmdk`)
- `iso` (allowed extensions: `.iso`, `.img`)
- `rootdir` (allowed extensions: ?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation for the rootdir content type is incomplete. Please clarify what file types are expected, or if it's not applicable to files, explain the purpose of this content type within the context of this resource.

- `snippets` (allowed extensions: any)
- `vztmpl` (allowed extensions: `.tar.gz`, `.tar.xz`, `tar.zst`)
- `datastore_id` - (Required) The datastore id.
Expand Down
2 changes: 2 additions & 0 deletions proxmoxtf/resource/validators/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import (
func ContentType() schema.SchemaValidateDiagFunc {
return validation.ToDiagFunc(validation.StringInSlice([]string{
"backup",
"images",
"iso",
"rootdir",
"snippets",
"vztmpl",
}, false))
Expand Down
2 changes: 1 addition & 1 deletion templates/guides/setup-proxmox-for-tests.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ Goal is to have a proxmox node in VM using <https://virt-manager.org/> for a job

10. Now you can run `make example`.

11. If you see error with proxmox_virtual_environment_file: the datastore "local" does not support content type "snippets"; supported content types are: `[backup, iso, vztmpl]`, you need to enable them, see <https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_file#snippets>.
11. If you see error with proxmox_virtual_environment_file: the datastore "local" does not support content type "snippets"; supported content types are: `[backup, images, iso, rootdir, vztmpl]`, you need to enable them, see <https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_file#snippets>.