Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This diagnostic occurs when you provide an invalid index number. Arrays in Bicep are zero-based. For more information, see Arrays.
The provided index value of <index-value> isn't valid for type <type-name>. Indexes for this type must be between 0 and <zero-based-tuple-index>.
Error
Use the correct index number.
The following example raises the diagnostic because the index is out of bounds:
var exampleArray = [
1
2
3
]
output bar int = exampleArray[3]
You can fix the diagnostic by using the correct index number:
var exampleArray = [
1
2
3
]
output bar int = exampleArray[2]
For more information about Bicep diagnostics, see Bicep core diagnostics.