Skip to content

Commit

Permalink
Ensure that backup is a bool and not a int. (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoktorAerzt authored Aug 8, 2022
1 parent 19b52cd commit c1de2ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ func resourceVmQemuCreate(d *schema.ResourceData, meta interface{}) error {
Pool: d.Get("pool").(string),
Bios: d.Get("bios").(string),
Onboot: d.Get("onboot").(bool),
Startup: d.Get("startup").(string),
Startup: d.Get("startup").(string),
Tablet: d.Get("tablet").(bool),
Boot: d.Get("boot").(string),
BootDisk: d.Get("bootdisk").(string),
Expand Down Expand Up @@ -1481,10 +1481,10 @@ func _resourceVmQemuRead(d *schema.ResourceData, meta interface{}) error {
if qemuDisk["cache"] == "" || qemuDisk["cache"] == nil {
qemuDisk["cache"] = "none"
}
if qemuDisk["backup"] == 0 {
qemuDisk["backup"] = false
} else if qemuDisk["backup"] == 1 {
qemuDisk["backup"] = true
if qemuDisk["backup"] == false {
qemuDisk["backup"] = 0
} else if qemuDisk["backup"] == true {
qemuDisk["backup"] = 1
}
}

Expand Down

0 comments on commit c1de2ad

Please sign in to comment.