diff --git a/proxmox/virtual_environment_vm_types.go b/proxmox/virtual_environment_vm_types.go index d3a905b2..e5a3d97b 100644 --- a/proxmox/virtual_environment_vm_types.go +++ b/proxmox/virtual_environment_vm_types.go @@ -1075,6 +1075,10 @@ func (r CustomStorageDevice) EncodeValues(key string, v *url.Values) error { values = append(values, fmt.Sprintf("mbps_wr_max=%d", *r.BurstableWriteSpeedMbps)) } + if r.Format != nil { + values = append(values, fmt.Sprintf("format=%s", *r.Format)) + } + if r.MaxReadSpeedMbps != nil { values = append(values, fmt.Sprintf("mbps_rd=%d", *r.MaxReadSpeedMbps)) } diff --git a/proxmoxtf/resource_virtual_environment_vm.go b/proxmoxtf/resource_virtual_environment_vm.go index b2fda77d..3da07410 100644 --- a/proxmoxtf/resource_virtual_environment_vm.go +++ b/proxmoxtf/resource_virtual_environment_vm.go @@ -2442,6 +2442,7 @@ func resourceVirtualEnvironmentVMGetDiskDeviceObjects( block := diskEntry.(map[string]interface{}) datastoreID, _ := block[mkResourceVirtualEnvironmentVMDiskDatastoreID].(string) + fileFormat, _ := block[mkResourceVirtualEnvironmentVMDiskFileFormat].(string) fileID, _ := block[mkResourceVirtualEnvironmentVMDiskFileID].(string) size, _ := block[mkResourceVirtualEnvironmentVMDiskSize].(int) diskInterface, _ := block[mkResourceVirtualEnvironmentVMDiskInterface].(string) @@ -2468,6 +2469,7 @@ func resourceVirtualEnvironmentVMGetDiskDeviceObjects( diskDevice.ID = &datastoreID diskDevice.Interface = &diskInterface + diskDevice.Format = &fileFormat diskDevice.FileID = &fileID sizeString := fmt.Sprintf("%dG", size) diskDevice.Size = &sizeString