This cleans up existing default VPC resources on new accounts that are provisioned on creation. Simply executing the script will query out to the EC2 service (each region, one at a time) grabbing the default VPC ID and pass it along with every request made to the cli, ensuring we are deleting only resources associated it.
Order of operations:
- Detach then delete the internet gateway
- Delete subnets
- Delete route tables
- Delete network access lists
- Delete security groups
- Delete the VPC
- Delete left over DHCP options