Skip to content

Commit

Permalink
fix(vm): memory size datatype conversion causing null on read (#715)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Boldyrev <[email protected]>
  • Loading branch information
bpg authored Nov 13, 2023
1 parent 5fe6892 commit 2bbf228
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxmoxtf/resource/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -4390,13 +4390,13 @@ func vmReadCustom(
memory := map[string]interface{}{}

if vmConfig.DedicatedMemory != nil {
memory[mkResourceVirtualEnvironmentVMMemoryDedicated] = *vmConfig.DedicatedMemory
memory[mkResourceVirtualEnvironmentVMMemoryDedicated] = int(*vmConfig.DedicatedMemory)
} else {
memory[mkResourceVirtualEnvironmentVMMemoryDedicated] = 0
}

if vmConfig.FloatingMemory != nil {
memory[mkResourceVirtualEnvironmentVMMemoryFloating] = *vmConfig.FloatingMemory
memory[mkResourceVirtualEnvironmentVMMemoryFloating] = int(*vmConfig.FloatingMemory)
} else {
memory[mkResourceVirtualEnvironmentVMMemoryFloating] = 0
}
Expand Down

0 comments on commit 2bbf228

Please sign in to comment.