Azure / Azure/template-analyzer
[BUG] Does not consider that resources could be in different subscriptions
- Dominant language
- C#
- Stars
- 143
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
In cases like this:
```
{
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"apiVersion": "2019-10-01",
"name": "aResource",
"properties": {}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2019-10-01",
"name": "aDeployment",
"properties": {},
"dependsOn": [
"[subscriptionResourceId('00000000-0000-0000-0000-000000000011', 'Microsoft.Resources/resourceGroups', aResource)]"
]
}
]
}
```
TemplateAnalyzer thinks the deployment is liked to the other resource in the template, even though it's actually pointing to a resource in a different subscription
### Expected behavior
The tool should consider the subscription where each resource is
### Reproduction Steps
Run the tool against a template like the example above, and stop the execution at the end of `ArmTemplateProcessor.ProcessTemplate`, `ResourceMapping` won't have the expected values
### Environment
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.