Azure / Azure/bicep

Nested resource type completion is done inconsistent with root resource completion

Open
#5,044 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 2h
Merged PRs (30d)
79

Description

**Bicep version**
VS Code v0.4.1008

**Describe the bug**
When auto completing resource types for root resoruces, auto completion is done in two parts - one to choose the resource ytpe, and then a second completion for hte version. However when completing the type for a nested resource, auto completion is done in one go. I'd expect the nested resource completion to also be done in two phases.

![image](https://user-images.githubusercontent.com/289860/139650808-5b8495cc-a689-48be-b954-d2b0fc655767.png)

**To Reproduce**
Start auto completion at the `|` character in the below sample (as shown in screenshot above)
```bicep
resource site 'Microsoft.Web/sites@2021-02-01' = {
name: 'site'

resource child |
}
}
```

**Additional context**
When auto completing resources for root resources, intellisense is split into two parts - one for hte resource type, and a second for the version
![image](https://user-images.githubusercontent.com/289860/139650842-f90ba423-2c22-4c38-b3d7-1827cbc457fb.png)
![image](https://user-images.githubusercontent.com/289860/139650919-3aab3321-9a92-4200-baa7-d30ff223ba2e.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in VS Code using the Bicep sample in the report, then compare root-resource and nested-resource completion behavior. Trace the completion entry point involved in each case and verify the nested flow is split into resource type and version phases; done means both completion paths behave consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, vscode
Domain
developer-experience, tooling
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.