From 5bf24839918134fa0e0e240da4d36e6f39d6047d Mon Sep 17 00:00:00 2001 From: maidlover <117573165+maidl0ver@users.noreply.github.com> Date: Wed, 30 Jul 2025 00:37:23 +0000 Subject: [PATCH] Update schema Signed-off-by: maidlover <117573165+maidl0ver@users.noreply.github.com> --- proxmoxtf/resource/container/container.go | 26 +++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/proxmoxtf/resource/container/container.go b/proxmoxtf/resource/container/container.go index 42db3038..01e83d71 100644 --- a/proxmoxtf/resource/container/container.go +++ b/proxmoxtf/resource/container/container.go @@ -344,6 +344,12 @@ func Container() *schema.Resource { }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + mkDiskACL: { + Type: schema.TypeBool, + Description: "Explicitly enable or disable ACL support", + Optional: true, + Default: dvDiskACL, + }, mkDiskDatastoreID: { Type: schema.TypeString, Description: "The datastore id", @@ -351,6 +357,18 @@ func Container() *schema.Resource { ForceNew: true, Default: dvDiskDatastoreID, }, + mkDiskQuota: { + Type: schema.TypeBool, + Description: "Enable user quotas for the container rootfs", + Optional: true, + Default: dvDiskQuota, + }, + mkDiskReplicate: { + Type: schema.TypeBool, + Description: "Will include this volume to a storage replica job", + Optional: true, + Default: dvDiskReplicate, + }, mkDiskSize: { Type: schema.TypeInt, Description: "The rootfs size in gigabytes", @@ -2963,17 +2981,17 @@ func containerUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) rootFS.Volume = diskBlock[mkDiskDatastoreID].(string) acl := types.CustomBool(diskBlock[mkDiskACL].(bool)) - id := diskBlock[mkDiskDatastoreID].(string) + _ = diskBlock[mkDiskDatastoreID].(string) mountOptions := diskBlock[mkDiskMountOptions].([]interface{}) quota := types.CustomBool(diskBlock[mkDiskQuota].(bool)) replicate := types.CustomBool(diskBlock[mkDiskReplicate].(bool)) - size := diskBlock[mkDiskSize].(string) + _ = diskBlock[mkDiskSize].(string) rootFS.ACL = &acl - rootFS.Volume = id // TODO: These aren't the same thing (?) + //rootFS.Volume = id // TODO: These aren't the same thing (?) rootFS.Quota = "a rootFS.Replicate = &replicate - rootFS.Size = size // TODO: Size is handled differently, can only grow + //rootFS.Size = size // TODO: Size is handled differently, can only grow if len(mountOptions) > 0 { mountOptionsArray := make([]string, 0, len(mountOptions))