Created
September 17, 2014 07:30
-
-
Save n0ts/3f6b95dec568c9674163 to your computer and use it in GitHub Desktop.
AWS EC2 create-tags
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
for i in `aws ec2 describe-security-groups | jq -r '@csv "\(.SecurityGroups[] | [.GroupId, .GroupName])"'`; do aws ec2 create-tags --resources `echo $i | cut -d ',' -f 1 | tr -d '"'` --tags Key=Name,Value=`echo $i | cut -d ',' -f 2 | tr -d '"'` ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment