Skip to content

Instantly share code, notes, and snippets.

@nagataka
Created July 9, 2013 15:31
Show Gist options
  • Save nagataka/5958320 to your computer and use it in GitHub Desktop.
Save nagataka/5958320 to your computer and use it in GitHub Desktop.
ec2-create-snapshot extension can specifying some tags.
#!/bin/sh
if [ "$1" = "" ]
then
echo usage $0 volume_id [--tag key[=value] [--tag key[=value] ...]]
exit 0
else
snapshotid=`ec2-create-snapshot $1 | awk '{print $2}'`
shift
while [ "$1" != "" ]; do
ec2-create-tags $snapshotid --tag $1
shift
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment