From 6d250a48a69013a23b8bb681391a6d424e39a5a7 Mon Sep 17 00:00:00 2001 From: maidlover <117573165+maidl0ver@users.noreply.github.com> Date: Sun, 3 Aug 2025 17:27:56 +0000 Subject: [PATCH] Add disk size to container update Signed-off-by: maidlover <117573165+maidl0ver@users.noreply.github.com> --- proxmoxtf/resource/container/container.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proxmoxtf/resource/container/container.go b/proxmoxtf/resource/container/container.go index 01e83d71..f019f337 100644 --- a/proxmoxtf/resource/container/container.go +++ b/proxmoxtf/resource/container/container.go @@ -2985,13 +2985,13 @@ func containerUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) mountOptions := diskBlock[mkDiskMountOptions].([]interface{}) quota := types.CustomBool(diskBlock[mkDiskQuota].(bool)) replicate := types.CustomBool(diskBlock[mkDiskReplicate].(bool)) - _ = diskBlock[mkDiskSize].(string) + size := types.DiskSizeFromGigabytes(diskBlock[mkDiskSize].(int64)) rootFS.ACL = &acl //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 if len(mountOptions) > 0 { mountOptionsArray := make([]string, 0, len(mountOptions)) @@ -3001,6 +3001,7 @@ func containerUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) } rootFS.MountOptions = &mountOptionsArray } + updateBody.RootFS = rootFS }