Azure / Azure/template-analyzer
Improve the evaluation of copied resources
- 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:

Expanded one:

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
Assessment
This issue has not been assessed yet.