Skip to content

Commit a03e140

Browse files
committed
Add UEFI support
1 parent 9496d6a commit a03e140

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

cloudstack/resource_cloudstack_instance.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ func resourceCloudStackInstance() *schema.Resource {
144144
Optional: true,
145145
},
146146

147+
"uefi": {
148+
Type: schema.TypeBool,
149+
Optional: true,
150+
Default: false,
151+
},
152+
147153
"start_vm": {
148154
Type: schema.TypeBool,
149155
Optional: true,
@@ -236,6 +242,11 @@ func resourceCloudStackInstanceCreate(d *schema.ResourceData, meta interface{})
236242
p.SetRootdisksize(int64(rootdisksize.(int)))
237243
}
238244

245+
if d.Get("uefi").(bool) {
246+
p.SetBoottype("UEFI")
247+
p.SetBootmode("Legacy")
248+
}
249+
239250
if zone.Networktype == "Advanced" {
240251
// Set the default network ID
241252
p.SetNetworkids([]string{d.Get("network_id").(string)})

website/docs/r/instance.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ The following arguments are supported:
7979
* `expunge` - (Optional) This determines if the instance is expunged when it is
8080
destroyed (defaults false)
8181

82+
* `uefi` - (Optional) When set, will boot the instance in UEFI/Legacy mode (defaults false)
83+
8284
## Attributes Reference
8385

8486
The following attributes are exported:

0 commit comments

Comments
 (0)