Skip to content

Commit

Permalink
Add script to clean-up unused AWS EC2 Instances and VPCs
Browse files Browse the repository at this point in the history
  • Loading branch information
shivakunv committed Dec 20, 2024
1 parent c07f700 commit 014a6e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/awscleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
--query "Vpcs[].VpcId" \
--output text | tr -d '\r' | tr '\n' ' ')
echo "Found VPCs: $vpcs"
echo "vpcs=$vpcs" >> $GITHUB_ENV
echo "AWS_VPC_IDS=$vpcs" >> $GITHUB_ENV
- name: Clean up VPCs
if: env.vpcs != ''
Expand Down
2 changes: 1 addition & 1 deletion scripts/awscleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ $# -ne 1 ]]; then
fi
export vpc=$1

echo "Start Deleting VPC: $vpc resource"
echo "Start cleanup of resources in VPC: $vpc"

# Delete Instance
instances=$(aws ec2 describe-instances \
Expand Down

0 comments on commit 014a6e0

Please sign in to comment.