Cannot decompile arm template generated using a loop that creates a module array param
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 79
Description
Here's two bicep files and its output ARM template
main.bicep
```bicep
param mainInput array
module mod 'foo.bicep' = {
name: 'test'
params: {
input: [for (item, index) in mainInput: mainInput[index]]
}
}
```
foo.bicep
```bicep
param input array
```
The resulting arm template cannot be decompiled because the value of the nested deployment's parameter does not have a `value`

Stacktrace of failure:


Contributor guide
Research direction
Reproduce the failure using the main.bicep and foo.bicep examples, then compare their generated ARM template with the decompiler failure shown in the stack trace. Trace how the nested deployment parameter is read during decompilation. Done means this template decompiles successfully while preserving the module array parameter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100