Closed saurabh-mridul closed 3 years ago
Can you share the full template?
here is the template -
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Ring0ClientId": {
"type": "string",
"defaultValue": "ABC"
},
"Ring1ClientId": {
"type": "string",
"defaultValue": "XYZ"
},
"Ring99ClientId": {
"type": "string"
"defaultValue": "MNP"
}
},
"variables": {
ringClientId = [parameters(concat('Ring', parameters('ringNumber'), 'ClientId'))]"
},
"resources": [
]
}
Would you be able to work around this limitation by passing in a complex object or a complex array via a single parameter?
We do support indexing objects by the property name strings which themselves can come from expressions. Indexing arrays by an index that comes from an expression is also supported.
surely, it's just a gap with bicep and if you all can address this... would be charm to be on par.
Bicep decompile is giving error while interpreting the variable having non constant name as below variableA = [parameters(concat('Ring', parameters('ringNumber'), 'ClientId'))]" its working with ARM templates as there are dedicated parameters being passed for specific values. this is to achieve logic for having switch statements in case application is having more than 2 rings.