Skip to content

Commit f08f5a5

Browse files
authored
Add UEFI support (#83)
1 parent e29c4cd commit f08f5a5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

cloudstack/resource_cloudstack_instance.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ func resourceCloudStackInstance() *schema.Resource {
154154
Optional: true,
155155
},
156156

157+
"uefi": {
158+
Type: schema.TypeBool,
159+
Optional: true,
160+
Default: false,
161+
},
162+
157163
"start_vm": {
158164
Type: schema.TypeBool,
159165
Optional: true,
@@ -282,6 +288,11 @@ func resourceCloudStackInstanceCreate(d *schema.ResourceData, meta interface{})
282288
p.SetRootdisksize(int64(rootdisksize.(int)))
283289
}
284290

291+
if d.Get("uefi").(bool) {
292+
p.SetBoottype("UEFI")
293+
p.SetBootmode("Legacy")
294+
}
295+
285296
if zone.Networktype == "Advanced" {
286297
// Set the default network ID
287298
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
@@ -87,6 +87,8 @@ The following arguments are supported:
8787
* `expunge` - (Optional) This determines if the instance is expunged when it is
8888
destroyed (defaults false)
8989

90+
* `uefi` - (Optional) When set, will boot the instance in UEFI/Legacy mode (defaults false)
91+
9092
## Attributes Reference
9193

9294
The following attributes are exported:

0 commit comments

Comments
 (0)