mirror of
https://github.com/letic/terraform-provider-proxmox.git
synced 2024-06-29 06:02:36 +00:00
Merge pull request #93 from claudusd/full_clone
Add choice between full or partial clone
This commit is contained in:
commit
48d6718ef8
|
@ -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,
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user