Loop Over Objects in Bicep #4110
-
Is there an ability to loop over objects in bicep? Scenario I normally use the loadTextContent() to load an external json file like below and then use it to loop .
input.json is as below
And then i use it loop over a module that create a bunch of storage accounts like below
Currently as of now the data structure in the input.json is a list, where as if i change it to a map something like below, the looping construct does not work.
If looping over objects was allowed i could easily reference outputs by its name rather than index in some other resource, something that terraform allows ( for_each allows to loop over maps). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
There is a discussion over here about the best way to handle filtering output via a Key. I don't believe we have a good resolution as yet. However please feel free to contribute to that discussion if you have any ideas Etc. |
Beta Was this translation helpful? Give feedback.
There is a discussion over here about the best way to handle filtering output via a Key.
#2165
I don't believe we have a good resolution as yet.
However please feel free to contribute to that discussion if you have any ideas Etc.