Skip to content

Commit 1a636f9

Browse files
committed
Standardize Memory ammount to GB for consistency
1 parent d2fc4d6 commit 1a636f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

driver/upcloud.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
110110
mcnflag.IntFlag{
111111
EnvVar: "UPCLOUD_MEMORY_AMOUNT",
112112
Name: "upcloud-memory-amount",
113-
Usage: "specify the amount of RAM to be assigned",
113+
Usage: "specify the amount (GB) of RAM to be assigned",
114114
},
115115
}
116116
}
@@ -260,7 +260,8 @@ func (d *Driver) Create() error {
260260
// and use the passed values
261261
if d.CoreNumber != 0 && d.MemoryAmount != 0 {
262262
createRequest.Plan = ""
263-
createRequest.MemoryAmount = d.MemoryAmount
263+
// Convert the MemoryAmount GB to MBs
264+
createRequest.MemoryAmount = d.MemoryAmount * 1024
264265
createRequest.CoreNumber = d.CoreNumber
265266
}
266267

0 commit comments

Comments
 (0)