Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellisesne inside lambda functions (map) #14064

Open
slavizh opened this issue May 10, 2024 · 1 comment
Open

Intellisesne inside lambda functions (map) #14064

slavizh opened this issue May 10, 2024 · 1 comment
Assignees
Milestone

Comments

@slavizh
Copy link
Contributor

slavizh commented May 10, 2024

Bicep version
Bicep CLI version 0.27.1 (4b41cb6)

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

To Reproduce

image

var subnets = []

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

    })
  }
}

Works if I use for loop:
image

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

image

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.

@slavizh
Copy link
Contributor Author

slavizh commented May 10, 2024

Another case for testing:
image

var subnets = []

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants