rebuy-de / aws-nuke

Nuke a whole AWS account and delete all its resources.
MIT License
5.72k stars 717 forks source link

FeatureFlags - Not clear what it is #818

Open zackriso opened 2 years ago

zackriso commented 2 years ago

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:

account-blocklist:

accounts: 000111222333:

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

svenwltr commented 2 years ago

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.

mavogel commented 1 year ago

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 ?