Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAT Gateway filtering is not working #310

Closed
GiamPy5 opened this issue Jun 8, 2022 · 1 comment
Closed

NAT Gateway filtering is not working #310

GiamPy5 opened this issue Jun 8, 2022 · 1 comment

Comments

@GiamPy5
Copy link
Contributor

GiamPy5 commented Jun 8, 2022

It looks like the filtering for NAT Gateways is not working.

config file:

default_regex: &default
  include:
    names_regex:
      - 'e2e-test-gf0'

s3: *default
AutoScalingGroup: *default
LambdaFunction: *default
LaunchConfiguration: *default
EBSVolume: *default
ECSService: *default
ECSCluster: *default
DynamoDB: *default
CloudWatchLogGroup: *default
VPC: *default
SecretsManager: *default
ELBv2: *default
IAMUsers: *default
OIDCProvider: *default
KMSCustomerKeys: *default
SecretsManager: *default
NATGateway: *default
ElasticIP: *default
EKSCluster: *default
Elasticache: *default
EC2: *default
TransitGateway: *default
OpenSearchDomain: *default
CloudWatchDashboard: *default
AccessAnalyzer: *default

cloud-nuke command:
cloud-nuke aws --log-level trace --region us-west-2 --dry-run --exclude-resource-type acmpca --exclude-resource-type accessanalyzer --exclude-resource-type transit-gateway --exclude-resource-type transit-gateway-attachment --exclude-resource-type rds --exclude-resource-type snap --exclude-resource-type ami --exclude-resource-type sqs --exclude-resource-type elb --config cloud-nuke-config.yaml

cloud-nuke output:

[cloud-nuke] INFO[2022-06-08T08:19:50Z] The following 6 AWS resources will be nuked: 
[cloud-nuke] INFO[2022-06-08T08:19:50Z] * nat-gateway nat-0a0b6383b409126ab us-west-2 
[cloud-nuke] INFO[2022-06-08T08:19:50Z] * nat-gateway nat-038077d19a3ab4f80 us-west-2 
[cloud-nuke] INFO[2022-06-08T08:19:50Z] * nat-gateway nat-02f79829098303bb1 us-west-2 
[cloud-nuke] INFO[2022-06-08T08:19:50Z] * nat-gateway nat-0782e8434b384b0b7 us-west-2 

AWS NAT gateways:
image

Expected ONLY found resources:
nat-038077d19a3ab4f80 us-west-2

@GiamPy5
Copy link
Contributor Author

GiamPy5 commented Jun 9, 2022

This actually can be closed because there was a fault in configuration, the YAML config key for NAT Gateways should be NatGateway instead of NATGateway. The README.md is misleading since it actually says NATGateway so I'll create another issue to track that problem.

@GiamPy5 GiamPy5 closed this as completed Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant