Azure / Azure/bicep

Intellisesne inside lambda functions (map)

Open
#14,064 1 comment 0 reactions 1 assignee Claimed by @anthony-c-martin View on GitHub
type system
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
Bicep CLI version 0.27.1 (4b41cb6d4b)

**Describe the bug**
Intellisense is lost inside map() example. It applies to other lambda functions as well.

**To Reproduce**

![image](https://github.com/Azure/bicep/assets/11890856/1e76ffdb-169c-41a4-8370-431eeef5bbac)

```bicep
var subnets = []

resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' = {
name: 'vnet'
properties: {
subnets: map(subnets, subnet => {

})
}
}

```

Works if I use for loop:
![image](https://github.com/Azure/bicep/assets/11890856/541d7b5b-2b13-44bf-9f03-9c359045d0cc)

It also should work if you have nested map() no matter how many times is nested:

![image](https://github.com/Azure/bicep/assets/11890856/17861980-9a9b-4273-ae0b-709cafc2db33)

```bicep
var subnets = []

resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' = {
name: 'vnet'
properties: {
subnets: map(subnets, subnet => {
name: subnet.name
properties: {
addressPrefix: subnet.addressPrefix
serviceEndpoints: map(subnet.serviceEndpoints, serviceEndpoint => {
locations: serviceEndpoint.locations
//service: serviceEndpoint.service

})
}
})
}
}

```

//cc @anthony-c-martin

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.