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

Bicep Parsing Error: Iterative loops cannot be parsed #6781

Open
dupuyjs opened this issue Oct 18, 2024 · 0 comments
Open

Bicep Parsing Error: Iterative loops cannot be parsed #6781

dupuyjs opened this issue Oct 18, 2024 · 0 comments

Comments

@dupuyjs
Copy link

dupuyjs commented Oct 18, 2024

Describe the issue
When using iterative loops in a Bicep file, the whole configuration cannot be parsed, resulting in the following error message:

Error parsing file /workspaces/infrastructure/bicep/main.bicep

The syntax is however valid and the infrastructure can be successfully deployed.

Example Value
The following example works fine:

var siteSubnets = [
  {
    name: 'snetsite1'
  }
  {
    name: 'snetsite2'
  }
]

The following example fails:

var siteSubnets = [
  for i in range(1, 2): {
    name: 'snetsite${i}'
  }
]

I suppose this is the same issue described at #6682.

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

No branches or pull requests

1 participant