ekristen / aws-nuke

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

Allow setting --prompt-delay to 0 #315

Open ssteo opened 4 days ago

ssteo commented 4 days ago

Hi, can we have the --prompt-delay switch to allow setting to any value? Having a 3 seconds wait minimum in CI/CD doesn't really make much sense. If we want to skip the prompt then it shouldn't need to wait further.

Thanks.

ekristen commented 4 days ago

@ssteo I think that's a valid point.

Do you think it should be any value any time or just any value when running in CI/CD?

ssteo commented 4 days ago

@ekristen Since there is already a default value of 10 seconds when it is not explicitly specified, I suggest to use the value specified in the command line switch any time so it is more deterministic and expected behaviour as a command-line tool.

ekristen commented 4 days ago

The default will remain. The 3 second was a safety thing, so I'm wondering if the safety check should remain when in interactive or non-CI type envs, or if you are suggesting it shouldn't matter, 0+ should be accepted at any time.

ssteo commented 4 days ago

IMHO, I strongly agree that the default should remain unchanged when those command-line switches are not specified. However, a value of 0 for --prompt-delay should be accepted in any environment when --no-prompt is used. When a user explicitly uses both of these switches, it's clear that they intend to run it instantly and understand the associated risks. If the 3-second safety delay remains even after the user specifies --no-prompt and --prompt-delay=0, it can feel like the command-line switch isn't functioning as expected.