mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-25 04:45:46 +00:00
Change volume name for containers
Signed-off-by: maidlover <117573165+maidl0ver@users.noreply.github.com>
This commit is contained in:
parent
0b2ed11480
commit
296866ae46
@ -2978,6 +2978,7 @@ func containerUpdate(ctx context.Context, d *schema.ResourceData, m interface{})
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
rootFS := &containers.CustomRootFS{}
|
||||
|
||||
rootFS.Volume = diskBlock[mkDiskDatastoreID].(string)
|
||||
|
||||
acl := types.CustomBool(diskBlock[mkDiskACL].(bool))
|
||||
@ -2986,10 +2987,15 @@ func containerUpdate(ctx context.Context, d *schema.ResourceData, m interface{})
|
||||
replicate := types.CustomBool(diskBlock[mkDiskReplicate].(bool))
|
||||
size := types.DiskSizeFromGigabytes(int64(diskBlock[mkDiskSize].(int)))
|
||||
|
||||
|
||||
rootFS.ACL = &acl
|
||||
rootFS.Quota = "a
|
||||
rootFS.Replicate = &replicate
|
||||
rootFS.Size = size
|
||||
// Disk ID for the rootfs is always 0
|
||||
diskID := 0
|
||||
vmID := d.Get(mkVMID).(int)
|
||||
rootFS.Volume = fmt.Sprintf("%s:vm-%d-disk-%d", rootFS.Volume, vmID, diskID)
|
||||
|
||||
if len(mountOptions) > 0 {
|
||||
mountOptionsArray := make([]string, 0, len(mountOptions))
|
||||
|
Loading…
Reference in New Issue
Block a user