Status: Failed Error: Code: InvalidTemplate Message: Unable to process template language expressions for resource '/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/keyvaultName/secrets/' at line '788' and column '5'. 'The language expression property 'AliasPrimaryConnectionString' doesn't exist, available properties are 'primaryConnectionString, secondaryConnectionString, primaryKey, secondaryKey, keyName'.
The weird thing is that it was working till a week back and we havent made any changes to the template. Logging in to the portal too able to see the AliasPrimaryConnectionString being present in serviceBus access policies as a SAS key. Not sure why template deployment is complaining it cannt find it. The Api Version being used is 2017-04-01.
The relevant template snippet:
{
"type": "Microsoft.KeyVault/vaults/secrets",
"name": "[concat(variables('AppKVName'), '/DeviceOrchestrationServiceBusSendKey', if(equals(copyIndex(), 0), '', copyIndex()))]",
"apiVersion": "2018-02-14",
"location": "[resourceGroup().location]",
"dependsOn": [
"[variables('AppKVName')]"
],
"properties": {
"value": "[replace(listKeys(resourceId(variables('StorageSubscriptionId'), variables('StorageResourceGroup'), 'Microsoft.ServiceBus/namespaces/topics/authorizationRules',concat(variables('AppServiceBusName'), if(equals(copyIndex(), 0), '', copyIndex())), variables('DeviceOrchestrationTopic'), variables('SendAccessKey')), variables('ServiceBusApiVersion')).AliasPrimaryConnectionString,';EntityPath=deviceorchestrationtopic', '')]"
},
"copy": {
"name": "DeviceOrchestrationServiceBusSendKeyCopy",
"count": "[variables('PartitionCountDeviceOrchestration')]"
}
},