Skip to content

Commit b0ecaf9

Browse files
committed
Add UEFI support
1 parent 27c14cf commit b0ecaf9

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
@@ -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,
@@ -277,6 +283,11 @@ func resourceCloudStackInstanceCreate(d *schema.ResourceData, meta interface{})
277283
p.SetRootdisksize(int64(rootdisksize.(int)))
278284
}
279285

286+
if d.Get("uefi").(bool) {
287+
p.SetBoottype("UEFI")
288+
p.SetBootmode("Legacy")
289+
}
290+
280291
if zone.Networktype == "Advanced" {
281292
// Set the default network ID
282293
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
@@ -85,6 +85,8 @@ The following arguments are supported:
8585
* `expunge` - (Optional) This determines if the instance is expunged when it is
8686
destroyed (defaults false)
8787

88+
* `uefi` - (Optional) When set, will boot the instance in UEFI/Legacy mode (defaults false)
89+
8890
## Attributes Reference
8991

9092
The following attributes are exported:

0 commit comments

Comments
 (0)