var myVar = loadJsonContent('config.json')
with the config.json
containing
{
"uami": {
"name": "myuami"
}
}
results in ARM JSON representation
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"variables": {
"$fxv#0": {
"uami": {
"name": "myuami"
}
},
"myVar": "[variables('$fxv#0')]"
},
"resources": [...]
}
which causes ARM-TTK to complain
[-] Variables Must Be Referenced (124 ms)
Unreferenced variable: $fxv#0
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0",
"variables": {
"myVar": { "uami": { "name": "myuami" } }
},
"resources": [...]
}