Last active
October 15, 2019 09:05
-
-
Save paulbrodner/86679805054a07c7be32e4e5a159bcfc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # change region here | |
| REGIONS=(eu-west-1 us-east-1) | |
| for region in "${REGIONS[@]}"; do | |
| echo "Resources with no tags in region: $region" | |
| export AWS_DEFAULT_REGION=$region | |
| aws resourcegroupstaggingapi get-resources | jq '.ResourceTagMappingList' | jq '.[] | select((.Tags|length) == 0) | {resource: .ResourceARN }' | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment