Created
February 5, 2020 23:19
-
-
Save anuragmathur1/b7399ac5dbfe6fe43bfec52adb849c87 to your computer and use it in GitHub Desktop.
Check if the EBS volumes are encrypted on instances with a given tag
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 volume in `aws ec2 describe-instances --filters Name=tag:tag-key,Values=tag-value --query 'Reservations[*].Instances[*].BlockDeviceMappings[*].Ebs.VolumeId' --output=text` | |
do | |
aws ec2 describe-volumes --volume-ids $volume --query 'Volumes[*].Encrypted' --output=text | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment