Open travisby opened 2 years ago
I've had PR https://github.com/hashicorp/packer-plugin-amazon/pull/109 open to do just as you requested, but have yet to get any feedback.
@KhrisRichardson-BO thnx a lot for PR! Maybe you know how it's possible to setup AWS Macos machine building?
because "dedicated" doesn't work for mac2.metal or mac1.metal we received error
Error launching source instance: InvalidParameterValue: Value (mac2.metal) for parameter instanceType is invalid. Instance type ‘mac2.metal’ cannot be launched with tenancy ‘dedicated’
and we again need manually create dedicated host and then build macos image with tenancy = "host"
the same as described here https://aws.amazon.com/blogs/compute/building-amazon-machine-images-amis-for-ec2-mac-instances-with-packer/
expected behaviour:
This was implemented in #109 and should me marked done.
To use it you need in source:
instance_type = "mac1.metal"
license_specifications {
license_configuration_request {
license_configuration_arn = "arn:..."
}
}
placement {
tenancy = "host"
}
And license needs to be added into host resource group.
Note the documentation has wrong syntax for above.
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
The AWS sdk supports
LicenseSpecifications
as part of theRunInstancesInput
.It would be great if - as part of
amazon-ebs
I was able to configure the said license specification.Specifying a license will allow you to pick a customer managed license that is backed by a
host-resource-group
, which in turn has the ability to auto-allocate EC2 hosts. By using this, it would be possible for packer to create (and let AWS finally destroy) dedicated metal instances for the use of image building.Use Case(s)
Today, my team uses packer to build OSX images in AWS. This requires the
mac1.metal
instance type, which today requires us to manuallyaws ec2 allocate-host
before we run packer. I believe with the above feature it could all happen automaticallyPotential configuration
Potential References