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
Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Jan 7, 2025
1 parent d306460 commit 2de1e89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/awscleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
- name: Identify resources for deletion
id: identify-resources
run: |
# Find vpcs with names ci*
# Find vpcs with Project holodeck and cicd Environment
vpcs=$(aws ec2 describe-vpcs \
--filters "Name=tag:Name,Values=ci*" \
"Name=tag:Project,Values=holodeck" "Name=tag:Environment,Values=cicd" \
--query "Vpcs[].VpcId" \
--output text | tr -d '\r' | tr '\n' ' ')
echo "Found VPCs: $vpcs"
Expand Down

0 comments on commit 2de1e89

Please sign in to comment.