Visualiser doesn't show dependencies with existing resources
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
VS Code 0.4.1
**Describe the bug**
If you have a reference to an existing resource, the visualiser doesn't show a dependency between the resources
**To Reproduce**
```bicep
resource galleryImageVersion 'Microsoft.Compute/galleries/images/versions@2020-09-30' existing = {
name: 'gallery/image/version'
}
resource vmScaleSet 'Microsoft.Compute/virtualMachineScaleSets@2021-03-01' = {
name: 'foo'
location: resourceGroup().location
properties: {
virtualMachineProfile: {
storageProfile: {
imageReference: {
id: galleryImageVersion.id
}
}
}
}
}
```

**Additional context**
If you remove the existing keyword, then the visualiser does render the dependency correctly

Contributor guide
Research direction
Start by reproducing the example in VS Code 0.4.1 and compare the visualiser output with and without the existing keyword. Trace how the visualiser detects dependencies from the existing resource reference; done means it renders an edge from galleryImageVersion to vmScaleSet.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, vscode
- Domain
- cloud, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100