Skip to content

Commit

Permalink
unused aws instace and vpcs cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Dec 18, 2024
1 parent 4465075 commit 289d76d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/awscleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ done
first_rt=""
route_tables=$(aws ec2 describe-route-tables \
--filters Name=vpc-id,Values=$vpc \
--query "RouteTables[?Associations[?Main==false]].RouteTableId" \
"RouteTables[].RouteTableId" \
--output text | tr -d '\r' | tr '\n' ' ')
for rt in $route_tables; do
if [ -z "$first_rt" ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/checkdependency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ ! -z "$nat_gateways" ]; then
exit 1
fi

eips=$(aws ec2 describe-addresses --filters "Name=network-interface.vpc-id,Values=$vpc" --query "Addresses[].PublicIp" --output text)
eips=$(aws ec2 describe-addresses --filters Name=domain,Values=vpc --query "Addresses[].[AllocationId,Association.VpcId]" --output text)
if [ ! -z "$eips" ]; then
echo "Please release the following Elastic IPs before deleting the VPC:"
echo $eips
Expand Down

0 comments on commit 289d76d

Please sign in to comment.