Skip to content

Commit

Permalink
Add choice between full or partial clone
Browse files Browse the repository at this point in the history
  • Loading branch information
claudusd committed Sep 30, 2019
1 parent bf7b3cd commit 18743c0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ func resourceVmQemu() *schema.Resource {
Optional: true,
ForceNew: true,
},
"full_clone": {
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
Default: true,
},
"qemu_os": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -478,6 +484,12 @@ func resourceVmQemuCreate(d *schema.ResourceData, meta interface{}) error {

// check if ISO or clone
if d.Get("clone").(string) != "" {
fullClone := 1
if !d.Get("full_clone").(bool) {
fullClone = 0
}
config.FullClone = &fullClone

sourceVmr, err := client.GetVmRefByName(d.Get("clone").(string))
if err != nil {
pmParallelEnd(pconf)
Expand Down

0 comments on commit 18743c0

Please sign in to comment.