Skip to content

Commit

Permalink
fix(vm): ignore ssd disk flag with virtio interface
Browse files Browse the repository at this point in the history
  • Loading branch information
abdo-farag committed Feb 6, 2023
1 parent ae91210 commit 034bbc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion proxmoxtf/resource_virtual_environment_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2488,9 +2488,12 @@ func resourceVirtualEnvironmentVMGetDiskDeviceObjects(
diskDevice.Size = &sizeString
diskDevice.SizeInt = &size
diskDevice.IOThread = &ioThread
diskDevice.SSD = &ssd
diskDevice.Discard = &discard

if !strings.HasPrefix(diskInterface, "virtio") {
diskDevice.SSD = &ssd
}

if len(speedBlock) > 0 {
speedLimitRead := speedBlock[mkResourceVirtualEnvironmentVMDiskSpeedRead].(int)
speedLimitReadBurstable := speedBlock[mkResourceVirtualEnvironmentVMDiskSpeedReadBurstable].(int)
Expand Down

0 comments on commit 034bbc7

Please sign in to comment.