AzSubscriptionCleaner
AzSubscriptionCleaner copied to clipboard
Add error handling
The AzSubCleanerTimeTrigger function should have error handling for Get-AzResource (line 17).
I was involved in a case where Get-AzResource failed on some runs, causing some resource groups which had resources to be accidentally deleted. Management locks was implemented afterwards to prevent this from happening again, but error handling should be added regardless if the environment is using Management Locks or not.
Interesting! Thanks @janegilring interested in writing the fix?
@FBoucher Yes, I can look into it and send a Pull Request when it's ready 👍