From 86d3603a7477a6cb01743585f4c7ade21632a0c3 Mon Sep 17 00:00:00 2001 From: threeio Date: Mon, 16 Dec 2019 13:10:21 -0800 Subject: [PATCH] Fixed volumes tag scan Was using the same context in find_all_volumes as find_untagged_volumes ("Volumes[].{ID: VolumeId}") which doesn't appear to show tag information. --- terraform-coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform-coverage.sh b/terraform-coverage.sh index 6fbd6f4..20344a2 100755 --- a/terraform-coverage.sh +++ b/terraform-coverage.sh @@ -125,7 +125,7 @@ find_all_volumes () { } find_untagged_volumes () { - aws ec2 describe-volumes --region $AWS_REGION --profile "${AWS_PROFILE}" --query "Volumes[].{ID: VolumeId}" --output json | jq -c '.[]' | grep -v $MANAGED_TAG + aws ec2 describe-volumes --region $AWS_REGION --profile "${AWS_PROFILE}" --query "Volumes[].{ID: VolumeId,Tag: Tags[].Key}" --output json | jq -c '.[]' | grep -v $MANAGED_TAG } create_ec2_volumes_badge () {