0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 10:33:46 +00:00

fix(lxc): allow container disk size 0 for lxc zfs/brfs subvols (#1737)

* fix(container): allow 0 size disks for zfs/btrfs subvolumes
* chore(docs): update docs

---------

Signed-off-by: Harm Kroon <harm.kroon@hotmail.com>
This commit is contained in:
H3Krn 2025-02-01 02:59:05 +01:00 committed by GitHub
parent d64d1af82e
commit 2925ae63f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -127,7 +127,8 @@ output "ubuntu_container_public_key" {
- `datastore_id` - (Optional) The identifier for the datastore to create the
disk in (defaults to `local`).
- `size` - (Optional) The size of the root filesystem in gigabytes (defaults
to `4`). Requires `datastore_id` to be set.
to `4`). When set to 0 a directory or zfs/btrfs subvolume will be created.
Requires `datastore_id` to be set.
- `initialization` - (Optional) The initialization configuration.
- `dns` - (Optional) The DNS configuration.
- `domain` - (Optional) The DNS search domain.

View File

@ -342,7 +342,7 @@ func Container() *schema.Resource {
Optional: true,
ForceNew: true,
Default: dvDiskSize,
ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(1)),
ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)),
},
},
},