Skip to content

Instantly share code, notes, and snippets.

@caioariede
caioariede / find-eks-cidrs.sh
Created August 12, 2025 11:22
Discovers and lists all CIDR ranges associated with an EKS cluster (VPC, subnets, ALBs)
#!/usr/bin/env bash
# find_eks_cidrs.sh - Fast, comprehensive EKS CIDR discovery
# Author: Caio Ariede <[email protected], [email protected]>
# Usage:
# ./find_eks_cidrs.sh [--no-vpc-subnets] [--no-vpc] [--no-alb] [--alb-dns <dns1[,dns2,...]>] \
# [-r <region>] [-c <cluster>] [--test-ip <ip>] [--quiet] [--no-color]
#
# Outputs categorized CIDR ranges to stdout
set -euo pipefail
import random
import calendar
import datetime
try:
input = raw_input
except NameError:
pass
from django.core.management.commands.makemigrations import Command as BaseCommand # noqa: E571
DEFAULT_MIGRATION_NAME = 'auto'
class Command(BaseCommand):
"""
Overrides default `makemigrations` command so we provide a fixed default
name for migrations. Instead of appending the "auto" + timestamp, we just

Keybase proof

I hereby claim:

  • I am caioariede on github.
  • I am caioariede (https://keybase.io/caioariede) on keybase.
  • I have a public key whose fingerprint is B036 141A 3D31 D02F 8E6E D91A A64E 24A9 DB89 B1FF

To claim this, I am signing this object: