Skip to content

Commit

Permalink
Terraform is able to set the boot order and the main disk
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Paranoiaque committed Aug 5, 2019
1 parent 0be9504 commit 025f0f8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ func resourceVmQemu() *schema.Resource {
Optional: true,
Default: true,
},
"boot": {
Type: schema.TypeString,
Optional: true,
Default: "cdn",
},
"bootdisk": {
Type: schema.TypeString,
Optional: true,
},
"agent": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -371,6 +380,8 @@ func resourceVmQemuCreate(d *schema.ResourceData, meta interface{}) error {
Name: vmName,
Description: d.Get("desc").(string),
Onboot: d.Get("onboot").(bool),
Boot: d.Get("boot").(string),
BootDisk: d.Get("bootdisk").(string),
Agent: d.Get("agent").(int),
Memory: d.Get("memory").(int),
QemuCores: d.Get("cores").(int),
Expand Down Expand Up @@ -528,6 +539,8 @@ func resourceVmQemuUpdate(d *schema.ResourceData, meta interface{}) error {
Name: d.Get("name").(string),
Description: d.Get("desc").(string),
Onboot: d.Get("onboot").(bool),
Boot: d.Get("boot").(string),
BootDisk: d.Get("bootdisk").(string),
Agent: d.Get("agent").(int),
Memory: d.Get("memory").(int),
QemuCores: d.Get("cores").(int),
Expand Down Expand Up @@ -617,6 +630,8 @@ func resourceVmQemuRead(d *schema.ResourceData, meta interface{}) error {
d.Set("name", config.Name)
d.Set("desc", config.Description)
d.Set("onboot", config.Onboot)
d.Set("boot", config.Boot)
d.Set("bootdisk", config.BootDisk)
d.Set("agent", config.Agent)
d.Set("memory", config.Memory)
d.Set("cores", config.QemuCores)
Expand Down

0 comments on commit 025f0f8

Please sign in to comment.