Azure / Azure/bicep

Incorrect loop suggestion usage when using conditons on properties

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

Description

**Bicep version**
Bicep CLI version 0.9.1 (a2950a16df)

**Describe the bug**
Bicep cannot do for loops when conditions are used on properties but intellisense suggest that is possible. Of course there is the option to do the loop in variable and reference the variable but that is workaround and it is not what intellisense suggest.

![image](https://user-images.githubusercontent.com/11890856/183916681-8af0cd75-d0a9-4119-a719-44aefeb007f7.png)

![image](https://user-images.githubusercontent.com/11890856/183916896-fc846d23-c0c6-4a1e-93a0-f49eb92503ba.png)

**To Reproduce**
In screenshot

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

Contributor guide

Open the contributing guide

Research direction

Start with the reported Bicep CLI version 0.9.1 and the two reproduction screenshots, then trace the IntelliSense suggestion for loops combined with conditions on properties. Compare the suggested form with the behavior that Bicep accepts; done means the suggestion no longer presents an invalid usage or the usage works as suggested.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.