Created
October 8, 2015 17:13
-
-
Save perplexes/50f82116b9f5fafaeb45 to your computer and use it in GitHub Desktop.
Copy AWS tags to Chef
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
#!/bin/bash | |
# brew install awscli | |
# brew install jq | |
# brew install parallel | |
aws ec2 describe-tags |\ | |
jq -r '.Tags[] | select(.ResourceType == "instance") | select(.Key != "Name") | "knife tag create \(.ResourceId) \(.Key)=\(.Value)"' |\ | |
parallel "sh -c {}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment