-
Notifications
You must be signed in to change notification settings - Fork 110
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support deprecated sources by adding a IncludeDeprecated
flag to source_ami_filter
#403
Comments
IncludeDeprecated
flag to source_ami_filter
IncludeDeprecated
flag to source_ami_filter
Hi @Ckarles, Good idea! I've opened a PR for this, if this is merged, this will be part of the next plugin release. Thanks for the suggestion! |
Out of curiosity, and since it may help me write an acceptance test for this feature, could I ask you which image you are depending on if this is publicly available? I can find a deprecated AMI to run a build on I would think, but this would save me some search time if you can share yours :) |
Hi, thanks for the quick patch! This image for example (on eu-west-1):
|
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
A call to AWS API
DescribeImages
can contain a boolean parameterIncludeDeprecated
. Sending aDescribeImages
with this flag toTrue
while using Filters to find an image will add in the response non-private images which have been marked as deprecated.I think this parameter is useful and should be supported by packer-plugin-amazon.
Use Case(s)
Using deprecated images as source.
Issue I'm facing right now: AMI was deprecated and we can't build from this images anymore. I'd like to only acknowledge and use
IncludeDeprecated
instead of the alternative (manually callingDescribeImage
before the call to packer and find the ami-id to pass to packer).Potential References
DescribeImage AWS API doc: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html
DescribeImage golang sdk: https://github.com/aws/aws-sdk-go-v2/blob/38e10609d10442e497844d3add2e4b9c6d2889f1/service/ec2/api_op_DescribeImages.go#L128C3-L128C20
Implementation:
AmiFilterOptions
packer-plugin-amazon/builder/common/ami_filter.go
Line 14 in 877a7b1
DescribeImage parameters set:
packer-plugin-amazon/builder/common/ami_filter.go
Lines 49 to 59 in 877a7b1
DescribeImage request:
packer-plugin-amazon/builder/common/step_pre_validate.go
Lines 103 to 108 in 877a7b1
The text was updated successfully, but these errors were encountered: