Azure / Azure/template-analyzer

Improve the evaluation of copied resources

Open
#261 0 comments 0 reactions 0 assignees View on GitHub
enhancement revisit
Dominant language
C#
Stars
143
Forks
47
PR merge metrics
No merged PRs in 30d

Description

Because the tool can now explore child resources to match a resource type, we could sometimes output repeated results. For example, when evaluating rule TA-000021 on this resource: https://github.com/Azure/template-analyzer/blob/18f2f5dca00cb7791097a96c1b1fc4a27571bd3d/src/Analyzer.Core.BuiltInRuleTests/Tests/TA-000021/AutomationAccountsVariables.json#L39

Original template with the mentioned resource:
![image](https://user-images.githubusercontent.com/11780216/177402513-4090e416-b5d2-4210-9064-cd760f9b9995.png)

Expanded one:
![image](https://user-images.githubusercontent.com/11780216/177402580-83539541-e546-49ba-bb56-9ce19f6923a6.png)

For some rules, we need to consider those copied resources during the evaluation, and for others, it results in repeated results

In PR #250 we started filtering repeated results from the tool output as a temporal solution to this problem, as we assume an elegant and performant solution to this could result in a big change in how the tool evaluates rules

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.