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

FeatureFlags - Not clear what it is

Open zackriso opened this issue 2 years ago • 1 comments

Can you please provide more details or information on what is FeatureFlags and how is it different from other options? In the example below:

feature-flags: disable-deletion-protection: RDSInstance: true EC2Instance: true CloudformationStack: true force-delete-lightsail-addons: true

I noticed that EC2Instance:true is part of the list. However, aws-nuke will for example list running EC2 instances, and they will be flagged as "would remove" with a completely vanilla config file such as below:


regions:

  • us-east-1

account-blocklist:

  • 1234567890

accounts: 000111222333:

so what would the feature-flag do if I add EC2Instance:true ?

zackriso avatar Jun 23 '22 19:06 zackriso

Hello. The indentation matters in yaml documents. EC2Instance: true is part of disable-deletion-protection:

feature-flags:
  disable-deletion-protection:
    RDSInstance: true
    EC2Instance: true
    CloudformationStack: true
  force-delete-lightsail-addons: true

This means setting feature-flagsdisable-deletion-protectionRDSInstance to true will disable the deletion protection before removing the EC2 instance.

svenwltr avatar Jun 24 '22 06:06 svenwltr

and are there more feature-flags and if so how to I find them in the documentation? Or is the preferred way to skim through the code myself https://github.com/rebuy-de/aws-nuke/blob/184aa732ddf99647e8a2a944d140c8fb757c73e3/pkg/config/config.go#L44 ?

mavogel avatar Apr 21 '23 09:04 mavogel