Skip to content

Commit

Permalink
Add hotplug support
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Paranoiaque committed Aug 6, 2019
1 parent 1d79b7e commit f0a71f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ func resourceVmQemu() *schema.Resource {
Optional: true,
Default: false,
},
"hotplug": {
Type: schema.TypeString,
Optional: true,
Default: "network,disk,usb",
},
"scsihw": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -398,6 +403,7 @@ func resourceVmQemuCreate(d *schema.ResourceData, meta interface{}) error {
QemuSockets: d.Get("sockets").(int),
QemuCpu: d.Get("cpu").(string),
QemuNuma: d.Get("numa").(bool),
Hotplug: d.Get("hotplug").(string),
Scsihw: d.Get("scsihw").(string),
QemuOs: d.Get("qemu_os").(string),
QemuNetworks: qemuNetworks,
Expand Down Expand Up @@ -559,6 +565,7 @@ func resourceVmQemuUpdate(d *schema.ResourceData, meta interface{}) error {
QemuSockets: d.Get("sockets").(int),
QemuCpu: d.Get("cpu").(string),
QemuNuma: d.Get("numa").(bool),
Hotplug: d.Get("hotplug").(string),
Scsihw: d.Get("scsihw").(string),
QemuOs: d.Get("qemu_os").(string),
QemuNetworks: qemuNetworks,
Expand Down Expand Up @@ -652,6 +659,7 @@ func resourceVmQemuRead(d *schema.ResourceData, meta interface{}) error {
d.Set("sockets", config.QemuSockets)
d.Set("cpu", config.QemuCpu)
d.Set("numa", config.QemuNuma)
d.Set("hotplug", config.Hotplug)
d.Set("scsihw", config.Scsihw)
d.Set("qemu_os", config.QemuOs)
// Cloud-init.
Expand Down

0 comments on commit f0a71f4

Please sign in to comment.