No, sorry I don't have such code lying around. But it should be really easy to parse the manifest file with jq and loop over the volumes and create a snapshot with the cli.
Give it a try and post again if you need help and provide what you got so far. Some lonks: https://docs.aws.amazon.com/cli/latest/reference/ec2/create-snapshot.html https://stedolan.github.io/jq/ https://www.packer.io/docs/post-processors/manifest.html On Tue, May 22, 2018, 18:35 <[email protected]> wrote: > Can you provide an example on how to accomplish this task? > > On Tuesday, May 22, 2018 at 12:25:44 PM UTC-4, Rickard von Essen wrote: >> >> You can't. But you can use the manifest post-processor, read it in a >> script that you run after packer and snapshot each ebs volume with the cli. >> >> On Tue, May 22, 2018, 16:30 <[email protected]> wrote: >> >>> I couldn't find information on how to create a snapshot after a newly >>> created ebs volume. >>> >>> -- >>> 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/00e78a83-08ad-448b-9a07-6d0a821055f6%40googlegroups.com >>> <https://groups.google.com/d/msgid/packer-tool/00e78a83-08ad-448b-9a07-6d0a821055f6%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/362920c7-d1ea-45bd-9b27-3076950807b8%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/362920c7-d1ea-45bd-9b27-3076950807b8%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/CALz9Rt_8mh7BFTPw2iT%3DZ2WZqYQL4ie_3%2BxnwxZKEYXSuDy0Aw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
