Azure / Azure/bicep

No intellisense (property discovery) is provided from default parameter values

Open
#4,111 4 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

### Discussed in https://github.com/Azure/bicep/discussions/4108

When you provide default parameter values in a Bicep template, they are not discovered with intellisense.

However intellisense is available from variable values.

Samples below:

```bicep
param stgAccountInfo2 object = {
name: 'teststorgae123'
sku: 'Standard_LRS'
}

param stgAccountInfo3 array = [
{
name: 'teststorgae123'
sku: 'Standard_LRS'
}
]

var stgAccountInfo = [
{
name: 'teststorgae123'
sku: 'Standard_LRS'
}
]

var myInfo = [for item in stgAccountInfo: item. ]

var myInfo1 = stgAccountInfo2.

var myInfo2 = [for item in stgAccountInfo3: item. ]
```

**Example 1**: using the same template - Intellisense discovery on a variable (array or object), **works**

![image](https://user-images.githubusercontent.com/3605266/130333191-26b5f4a3-e36b-4956-bc63-4eb2039a7948.png)

**Example 2**: using the same template - Intellisense discovery on a parameter object **doesn't work**

![image](https://user-images.githubusercontent.com/3605266/130334026-c19f8630-1560-4d69-909c-2c1bd868f60f.png)

**Example 3**: using the same template - Intellisense discovery on a parameter array **doesn't work**

![image](https://user-images.githubusercontent.com/3605266/130333148-f547badf-8df2-4d84-ba8a-8f0e801f730e.png)

Contributor guide

Open the contributing guide

Research direction

Start with the Bicep examples in the issue and compare property completion for variable values with object and array parameter defaults. Reproduce the missing suggestions in the editor, then confirm that property discovery works for both parameter forms as it already does for variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.