hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder
https://www.packer.io/docs/builders/amazon
Mozilla Public License 2.0
75 stars 112 forks source link

AWS Builders : add uefi-preferred boot_mode #362

Closed kivengh closed 1 year ago

kivengh commented 1 year ago

Community Note

Please search the existing issues for relevant feature requests, and use the reaction feature (https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to add upvotes to pre-existing requests.

Description

in AWS Builders (i use ebs surrogate), it would be nice to add boot-mode to "uefi-preferred" like explain in

Use Case(s)

Be able tu create an AMI with "uefi-preferred" boot mode

Potential configuration

source "amazon-ebssurrogate" "buildami" {
boot_mode = "uefi-preferred"
[...]
}

Potential References

AWS documentation : https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html.

nywilken commented 1 year ago

@kivengh this feature is available in the latest Amazon plugin release https://github.com/hashicorp/packer-plugin-amazon/releases/tag/v1.2.2

You can install the latest release by adding the required_plugins block to your HCL2 template and running packer init .

packer {
  required_plugins {
    amazon = {
      version = ">= 1.2.2"
      source  = "github.com/hashicorp/amazon"
    }
  }
}

Or you can run packer plugins install github.com/hashicorp/amazon v1.2.2 to install version 1.2.2 of the plugin, which should have this fix for this issue.

I'm going to close this issue as it is a plugin supported feature. If you find that you are running into trouble or if I am wrong about uefi_preferred being supported for the ebssurrogate builder feel free to drop a comment on the thread and I will reopen,.