It can't be done directly in packer, but you can use the cli to find the snapshot ID and pass it as a variable.
On Wed, Feb 6, 2019, 20:26 <[email protected] wrote: > I was wondering if there was a way to filter a source snapshot for a > volume. I am creating a volume using launch_block_device_mappings from a > given snapshot. I would like to have this snapshot_id not be a hard coded > value but rather a filter that picks out the latest snapshot. Is there a > way to do this in packer? I see other types of filters in the docs: subnet > filters, ami filters, security group filters, etc. But I do not see a > snapshot filter. Is this something that can be done in packer? > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/packer/issues > IRC: #packer-tool on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Packer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/packer-tool/ca2cb282-4dc0-45d9-b080-7c0a7b0fca29%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/ca2cb282-4dc0-45d9-b080-7c0a7b0fca29%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt9XQ9tO3xjWB7%3DZ2MbQkEeCBk%3DcDnkezhV0%2BUWnjOrukg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
