Azure/bicep

n.filter is not a function - in Azure Portal

nicolgit opened this issue · 5 comments

Bicep version
Bicep CLI version 0.18.4 (1620479)

Describe the bug
I have generated an ARM template from a bicep file. when I use the following link to deploy it, I receive the message "n.filter is not a function"

https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fnicolgit%2Fhub-and-spoke-playground%2Fmain%2Fhub-01-bicep%2Fhub-01.json

To Reproduce
Steps to reproduce the behavior:

build the file hub-01.json starting from the bicep file hub-01.bicep then use https://portal.azure.com/#create/Microsoft.Template to deploy the ARM template

you can find the repo with all files here: https://github.com/nicolgit/hub-and-spoke-playground/tree/main/hub-01-bice

Additional context
N/A

Can you please open a support ticket for this issue? It is because you are using ARM templates with symbolic names, which is due to opting in to an experimental feature. The portal does not know how to handle the new template schema. We have an outstanding ask out to them to fix it.

support request opened> 2307120050001909

here the answer from the escalation on the above ticket:

===

Thanks for the feedback and apologies for the delayed response.

The product team actually shared a possible workaround that may mitigate the issue:

Symbolic names are currently an experimental feature in the ARM engine and require that a template language version be specified:

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "languageVersion": "1.10-experimental",
  "parameters": { ... },
  "resources": { ... }
}

The ARM engine will reject any template that uses symbolic names and does not specify a language version.

Can you send the support ticket number? The issue is not in the ARM engine, as the template should have that languageVersion property. This support case should be going to the ARM Portal support pod/engineering team.

HI Alex the support ticket number is 2307120050001909