-
Notifications
You must be signed in to change notification settings - Fork 753
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
multiple resource loops creates an out of bounds error #6075
Comments
The generated template also fails preflight and will not deploy. |
FYI - if you don't use the resource grandChild 'Microsoft.Storage/storageAccounts/blobServices/containers' = {
name: 'grandParentName/parentName/childName'
} I imagine that is not fun to author with the complexity required here, but if this is blocking anyone, I wanted to make folks aware. @majastrz is actively working on a fix. |
@bmoore-msft @alex-frankel already logged long time ago #5269 |
@majastrz -- can you take a look at the linked issue and close if it is a dup? I noticed that in that issue the example only uses the |
#4453 also seems like a potential dup |
I still hope all will be fixed :) |
Bicep version
Bicep CLI version 0.4.1272 (a69022d)
Describe the bug
I think what's happening is that when we create an n*m parent/child set of resources, the copyIndex() from the n named resource is used in the m loop and can create an index out of bounds problem. I was not able to figure out how to fix this logic in bicep, but could manually author the template in json.
To Reproduce
Compile this file and load the json in VS code, it will flag the error.
Additional context
This is a working json template for the scenario (manually authored)
The text was updated successfully, but these errors were encountered: