You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get invalid JSON when I use the Build ARM Template in VS Code. With the error
Template validation failed: The template resource '[items(parameters('nsgValues'))[copyIndex()].value.name]' at line '27' and column '5' is not valid: The template function 'items' is not valid. Please see https://aka.ms/arm-template-expressions for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.arm-template (validat
To Reproduce
Create a new test.bicep file in VS Code with the ARM and Bicep extensions from Microsoft installed. Copy and paste the above code from the Dictionary object example on https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/loops
Save the file
Right click on the test.bicep file
Select 'Build ARM Template'
Open the test.json that is generated.
You will see an error from the ARM extension indicating that the template is invalid.
Additional context
The template will also not pass validation in Azure.
The text was updated successfully, but these errors were encountered:
dxk3355
changed the title
Bicep to Arm conversion generate invalid ARM json for Dictionary object.
Bicep to Arm conversion generates invalid json for dictionary object.
Sep 25, 2023
Bicep version
Unknown, Visual Studio Code plugin. Example commands do not work.
Describe the bug
Using the Dictionary object example on https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/loops
I get invalid JSON when I use the Build ARM Template in VS Code. With the error
Template validation failed: The template resource '[items(parameters('nsgValues'))[copyIndex()].value.name]' at line '27' and column '5' is not valid: The template function 'items' is not valid. Please see https://aka.ms/arm-template-expressions for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.arm-template (validat
To Reproduce
Create a new test.bicep file in VS Code with the ARM and Bicep extensions from Microsoft installed. Copy and paste the above code from the Dictionary object example on https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/loops
Save the file
Right click on the test.bicep file
Select 'Build ARM Template'
Open the test.json that is generated.
You will see an error from the ARM extension indicating that the template is invalid.
Additional context
The template will also not pass validation in Azure.
The text was updated successfully, but these errors were encountered: