aws-nuke icon indicating copy to clipboard operation
aws-nuke copied to clipboard

Feature request: Include AutoScalingGroup for more granular filter tagging

Open stoimendhristov opened this issue 4 years ago • 0 comments

I can verify that right now the AutoScalingGroup resource filtering is not granular enough by simply running the aws-nuke in a dry run mode. I get an output similar to the following one:

[1mus-east-1[0m - [mAutoScalingGroup[0m - [1mmy-asg[0m - [34mwould remove

I can also check (in v2.15.0 tag) that the following resources support tag matching:

~/Code/aws-nuke (b5ccc00 ✔) ᐅ ack -l 'properties.SetTag' ./resources | xargs ack --no-filename 'register\("([^"]+)",' --output='$1' | sed '/^[[:space:]]*$/d' | sort
ACMCertificate
ACMPCACertificateAuthority
ACMPCACertificateAuthorityState
APIGatewayRestAPI
APIGatewayV2API
APIGatewayV2VpcLink
APIGatewayVpcLink
AppSyncGraphqlAPI
CloudFormationStack
CodeStarNotificationRule
DynamoDBTable
EC2Address
EC2ClientVpnEndpoint
EC2DHCPOption
EC2EgressOnlyInternetGateway
EC2Image
EC2Instance
EC2InternetGateway
EC2InternetGatewayAttachment
EC2NATGateway
EC2NetworkACL
EC2NetworkInterface
EC2RouteTable
EC2SecurityGroup
EC2Subnet
EC2TGW
EC2TGWAttachment
EC2VPC
EC2VPCEndpoint
EC2VPNConnection
EC2VPNGatewayAttachment
EC2Volume
ELB
ELBv2
ELBv2TargetGroup
FSxBackup
FSxFileSystem
IAMRole
IAMRolePolicy
KMSKey
LambdaFunction
LightsailInstance
RDSDBCluster
RDSDBClusterParameterGroup
RDSDBParameterGroup
RDSDBSubnetGroup
RDSEventSubscription
RDSInstance
RDSSnapshot
S3Bucket
SNSTopic
SSMParameter
SecretsManagerSecret
TransferServer
TransferServerUser

An example of the EC2Instance resource when matched for a removal is:

[0m[1mus-east-1[0m - [mEC2Instance[0m - [1mi-0335f2421d882cd32[0m - [3m[tag:Name: "my-ec2"][0m - [34mwould remove

Has it been planned to include ASG resources for tag filtering as removing EC2 instances is fine but when keeping the ASG up and running new EC2s are spun up?

Thanks for your reply.

stoimendhristov avatar Apr 19 '21 08:04 stoimendhristov