You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In current state when you use a dateOlderThan filter, it'll return an error if it comes across a resource/field that it cannot parse as a date, and will prevent aws-nuke from running on all of the other resources it may have successfully processed
This change will instead only log a warning when an error occurs, which the user will be able to see. The resource will not be filtered out (although I'm not opinionated either way, my main goal is to not hold up aws-nuke from running because one resource was misconfigured)
I'm open to feedback/change requests
Here's an example output with these changes:
Do you really want to nuke the account with the ID 123456789012 and the alias 'my-account'?
Waiting 3s before continuing.
time="2024-07-11T21:22:47Z" level=warning msg="Failed to parse date IAMNOTADATE: unable to parse time IAMNOTADATE"
us-west-1 - DynamoDBTable - testing - [Identifier: "testing", tag:expiration-date: "IAMNOTADATE"] - would remove
Scan complete: 1 total, 1 nukeable, 0 filtered.
The above resources would be deleted with the supplied configuration. Provide --no-dry-run to actually destroy resources.
I think it makes sense to just change this behavior to log the error. After thinking about this this wont actually change the filtering. It wouldn't have matched to begin with and an error just interrupts.
I think this should remain error because this is parsing the configuration and if it's an invalid duration it should be error'd out, or we need a validation on config to error it out before this point.
Original Post
Upstream Reference: rebuy-de/aws-nuke#1245
The text was updated successfully, but these errors were encountered: