mlevit / aws-auto-cleanup

Programmatically delete AWS resources based on an allowlist and time to live (TTL) settings
MIT License
495 stars 55 forks source link

Nat gateways whitelisting does not work #120

Closed membra closed 2 years ago

membra commented 2 years ago

Describe the bug A NAT gateway is in allowlist based on doco:

EC2 NAT Gateways | NAT Gateway ID | ec2:instance:nat_gateway_id -- | -- | --

image

But it is listed as DELETED after the run

image

Expected behavior NAT gateway is skipped if it is in allowlist

membra commented 2 years ago

I suspect the issue might be with the documentation itself... "nat_gateway" is what is expected, not "instance"

mlevit commented 2 years ago

Great pickup @membra. The documentation is wrong. nat_gateway is the correct resource.

mlevit commented 2 years ago

Fixed https://github.com/servian/aws-auto-cleanup/commit/8dacdc0c5197925b4970778e00599514d621bf01