Skip to content

How would I do a two dimensional loop to enumerate vnet pairs? #14762

Answered by GABRIELNGBTUC
juliusl asked this question in Q&A
Discussion options

You must be logged in to vote

Nested loops are not supported by bicep. There is also the issue mentioned in the error which is different from the unsupported two dimensional loops.

For the BCP144, add a bicepconfig.json file to the root directory with the following content:

{
  "analyzers": {
    "core": {
      "rules": {
        "no-unused-params": {
          "level": "warning"
        }
      }
    }
  },
  "experimentalFeaturesEnabled": {
    "symbolicNameCodegen": true
    
  }
}

And loop over resources/modules using the map function. This is because:

  1. Bicep still tries to use language version 1 unless some specific features are present in the current file
  2. In language version 2, looping resources/modules is only…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@juliusl
Comment options

@anthony-c-martin
Comment options

Answer selected by juliusl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants