mirror of
https://github.com/letic/terraform-provider-proxmox.git
synced 2024-09-27 21:46:01 +00:00
Merge pull request #129 from V-Paranoiaque/feature/balloon
Add ballooning feature for memory
This commit is contained in:
commit
ecb0b334ac
@ -96,6 +96,11 @@ func resourceVmQemu() *schema.Resource {
|
||||
Optional: true,
|
||||
Default: 512,
|
||||
},
|
||||
"balloon": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Default: 0,
|
||||
},
|
||||
"cores": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
@ -449,6 +454,7 @@ func resourceVmQemuCreate(d *schema.ResourceData, meta interface{}) error {
|
||||
BootDisk: d.Get("bootdisk").(string),
|
||||
Agent: d.Get("agent").(int),
|
||||
Memory: d.Get("memory").(int),
|
||||
Balloon: d.Get("balloon").(int),
|
||||
QemuCores: d.Get("cores").(int),
|
||||
QemuSockets: d.Get("sockets").(int),
|
||||
QemuVcpus: d.Get("vcpus").(int),
|
||||
@ -640,6 +646,7 @@ func resourceVmQemuUpdate(d *schema.ResourceData, meta interface{}) error {
|
||||
BootDisk: d.Get("bootdisk").(string),
|
||||
Agent: d.Get("agent").(int),
|
||||
Memory: d.Get("memory").(int),
|
||||
Balloon: d.Get("balloon").(int),
|
||||
QemuCores: d.Get("cores").(int),
|
||||
QemuSockets: d.Get("sockets").(int),
|
||||
QemuVcpus: d.Get("vcpus").(int),
|
||||
@ -739,6 +746,7 @@ func resourceVmQemuRead(d *schema.ResourceData, meta interface{}) error {
|
||||
d.Set("bootdisk", config.BootDisk)
|
||||
d.Set("agent", config.Agent)
|
||||
d.Set("memory", config.Memory)
|
||||
d.Set("balloon", config.Balloon)
|
||||
d.Set("cores", config.QemuCores)
|
||||
d.Set("sockets", config.QemuSockets)
|
||||
d.Set("vcpus", config.QemuVcpus)
|
||||
|
Loading…
Reference in New Issue
Block a user