You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add orphaned test-VPC reaper and standardize dry-run across cleaners
clean_eks: after the cluster pass, reap dedicated EFA test VPCs
(tag:Name efa-test-vpc-*) left behind by failed terraform destroys.
Tears the stack down in dependency order — VPC endpoints, NAT gateways,
Elastic IPs, leftover ENIs, internet gateways, subnets, route tables,
security groups (revoke-then-delete), then the VPC — behind three safety
gates: not backing a live EKS cluster (prod + best-effort beta), no
active EC2 instances (re-checked before subnet deletion), and an age
gate from the newest NAT gateway/VPC endpoint. A cleaner:reaping tag lets
a partially-torn-down VPC resume on a later run instead of being stranded
once its age signals are gone.
Shared dry-run: add tool/clean/clean_flags.go (clean.DryRun,
RegisterCommonFlags, Skip) and gate every mutating call across all 12
cleaners. Add a -dry-run flag to each tool and a workflow_dispatch
dry_run input (DRY_RUN env: scheduled runs stay live, manual defaults to
dry-run). Normalize --tags=clean to build-flag position and move
ecs/host region args to flag.Arg(0).
Also fix pre-existing bugs surfaced while touching these files:
- clean_ecs: inverted-sign expiration deleted clusters with active tasks
- clean_security_group: break-in-select spun pagination to timeout
- clean_ebs / clean_file_system: age no-op and stale-error under-deletion
0 commit comments