AzSubscriptionCleaner icon indicating copy to clipboard operation
AzSubscriptionCleaner copied to clipboard

Add error handling

Open janegilring opened this issue 5 years ago • 2 comments

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.

janegilring avatar May 24 '20 08:05 janegilring

Interesting! Thanks @janegilring interested in writing the fix?

fboucher avatar Jun 03 '20 21:06 fboucher

@FBoucher Yes, I can look into it and send a Pull Request when it's ready 👍

janegilring avatar Jun 04 '20 13:06 janegilring