Filter snapshot

10 views
Skip to first unread message

nnat...@ucsd.edu

unread,
Feb 6, 2019, 2:26:52 PM2/6/19
to Packer
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? 

Rickard von Essen

unread,
Feb 6, 2019, 4:05:51 PM2/6/19
to packe...@googlegroups.com
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 <nnat...@ucsd.edu 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 packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/ca2cb282-4dc0-45d9-b080-7c0a7b0fca29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages