Closed arrerezai closed 5 months ago
Looks like a recent change has messed with the logic in that block, it was update to provide a message when a scope was locked but the check for status code value got removed. Need to fix it up
Well, you'll be fine if you bring back the first if statement, checking for any status codes outside of 200-299 and then closing the curly bracket at the very bottom such that the else statements are all located within the first if statement. This way, no status codes between 200-299 will ever be processed by that block, which is literally what we wish for. Change is proposed above through a PR.
Discussed in https://github.com/Azure/enterprise-azure-policy-as-code/discussions/675