Skip to content

Commit

Permalink
updated aws_ec2_ebs_volumes.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Nov 13, 2024
1 parent aafc36b commit c207675
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aws/aws_ec2_ebs_volumes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ while read -r instance_id instance_name; do
#echo "Instance Name: $instance_name, Instance ID: $instance_id"

timestamp "Getting volume list for EC2 instance: $instance_name"

if ! is_instance_id "$instance_id"; then
die "Invalid Instance ID passed into loop with instance name '$instance_name', failed regex validation: $instance_id"
fi

# false positive
# shellcheck disable=SC2016
#volume_ids="$(aws ec2 describe-volumes --filters "Name=attachment.instance-id,Values=$instance_id" --query 'Volumes[*].[VolumeId, Tags[?Key==`Name`].Value|[0]]' --output text)"
Expand Down

0 comments on commit c207675

Please sign in to comment.