Azure / Azure/bicep

Visualiser doesn't show dependencies with existing resources

Open
#3,013 2 comments 1 reaction 0 assignees View on GitHub
enhancement good first issue story: visualizer
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
}
}
}
}
}
```
![image](https://user-images.githubusercontent.com/289860/120708137-1e365780-c4b3-11eb-9988-eb2644edac18.png)

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

![image](https://user-images.githubusercontent.com/289860/120708152-255d6580-c4b3-11eb-92bd-d222fd8083e3.png)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.