diff --git a/pkg/commands/nuke/nuke.go b/pkg/commands/nuke/nuke.go index 24327566..be9ce6ee 100644 --- a/pkg/commands/nuke/nuke.go +++ b/pkg/commands/nuke/nuke.go @@ -57,14 +57,15 @@ func execute(baseCtx context.Context, c *cli.Command) error { //nolint:funlen,go // Create the parameters object that will be used to configure the nuke process. params := &libnuke.Parameters{ - Force: c.Bool("force"), - ForceSleep: c.Int("force-sleep"), - Quiet: c.Bool("quiet"), - NoDryRun: c.Bool("no-dry-run"), - Includes: c.StringSlice("include"), - Excludes: c.StringSlice("exclude"), - Alternatives: c.StringSlice("cloud-control"), - MaxWaitRetries: c.Int("max-wait-retries"), + Force: c.Bool("force"), + ForceSleep: c.Int("force-sleep"), + Quiet: c.Bool("quiet"), + NoDryRun: c.Bool("no-dry-run"), + Includes: c.StringSlice("include"), + Excludes: c.StringSlice("exclude"), + Alternatives: c.StringSlice("cloud-control"), + MaxWaitRetries: c.Int("max-wait-retries"), + MaxFailureRetries: c.Int("max-failure-retries"), } if len(c.StringSlice("feature-flag")) > 0 { @@ -296,6 +297,11 @@ func init() { //nolint:funlen Usage: "maximum number of retries to wait for dependencies to be removed", Action: common.CheckRealInt, }, + &cli.IntFlag{ + Name: "max-failure-retries", + Usage: "maximum number of retries to wait for failed dependencies to be removed", + Action: common.CheckRealInt, + }, &cli.DurationFlag{ Name: "run-sleep-delay", Sources: cli.EnvVars("AWS_NUKE_RUN_SLEEP_DELAY"),