ekristen / aws-nuke

Remove all the resources from an AWS account
https://ekristen.github.io/aws-nuke/
MIT License
246 stars 25 forks source link

transit gateway ENI exclusion not working #428

Open blek129560 opened 15 hours ago

blek129560 commented 15 hours ago

I have few ENIs in-use. I don't have tags and instead i have added the following to the exclusion filter :

  EC2NetworkInterface:
  - property: Interface Type
    type: glob
    value: "transit_gateway"  

Ideally, on the log, it should show a message such as " filtered by config" and not delete it, but instead, it shows

ap-southeast-2 - EC2NetworkInterface - eni-xxxxxxxxxxxxxxxxxxxx - [AvailabilityZone: "ap-southeast-2b", ID: "eni-xxxxxxxxxxxxxx", PrivateIPAddress: "10.XXX.XX.XXX", Status: "in-use", SubnetID: "subnet-xxxxxxxxxxxxxxX", VPC: "vpc-XXXXXXXXXXXXXXXX", tag:aws:ecs:clusterName: "cluster-ecs-XXXXXXf"] - failed

I want the message to be "filtered by config" instead of "failed"

note : I can filter the ENIs by description as it has a fixed pattern , but I don't have tags. that's how the system is designed.

ekristen commented 9 hours ago

There is no property Interface Type. To filter you must use the eni-* or one of the properties listed in between the [] in the output.