mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 02:31:10 +00:00
fix(vm): Fix file_format
setting for new empty disks (#259)
This commit is contained in:
parent
5b9e6eba05
commit
d29fd97bab
@ -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))
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user