-
-
Save yyolk/a19e227d7c39e87a0fa2 to your computer and use it in GitHub Desktop.
Get EBS Snapshot ID from a Packer build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packer build -machine-readable packer.json | tee build.log | |
grep 'artifact,0,id' build.log | cut -d, -f6 | cut -d: -f2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packer build -machine-readable packer.json | tee build.log | |
grep 'Tagging snapshot' build.log | cut -d, -f5 | cut -d: -f3 | grep -o '[^$(printf '\t')].*' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment