The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
737 B

  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. function die {
  6. echo 1>&2 "${1}"
  7. exit 1
  8. }
  9. THISDIR=$(cd $(dirname ${0}) && pwd)
  10. for region in $(${THISDIR}/list_regions.sh) ; do
  11. echo "Deleting subnets in region ${region}"
  12. ${THISDIR}/set_aws_region.sh ${region} || die "Error setting aws region ${region}"
  13. for subnet in $(aws ec2 describe-subnets --filters "Name=default-for-az,Values=false" | grep SubnetId | cut -d\" -f4) ; do
  14. echo "Deleting subnet ${subnet} in region ${region}"
  15. aws ec2 delete-subnet --subnet-id ${subnet} || echo "WARNING: Error deleting subnet ${subnet} in region ${region}"
  16. done
  17. done