Reputation: 6156
I'm working on creating an ARM template for a QnAMaker resource type in Azure. After creating a QnAMaker resource and exporting the template it creates a number of resources:
"PrimaryEndpointKey": "[concat(parameters('appName'), '-PrimaryEndpointKey')]"
The ARM template has a hardcoded value in the "/sites" resource rather than picking it up from another resource.
In the outputs, there is a link to qna runtime:
"qnaRuntimeEndpoint": {
"type": "String",
"value": "[concat('https://',reference(resourceId('Microsoft.Web/sites', parameters('appName'))).hostNames[0])]"
}
What should the output value be for retrieving a subscription key for the QnAMaker resource?
Upvotes: 0
Views: 197
Reputation: 6156
This uses cognitive services related functions. Looking at some other examples I arrived at...
"outputs": {
"qnaKey":{
"type": "string",
"value": "[listKeys(concat(resourceGroup().id,'/providers/','Microsoft.CognitiveServices/accounts/', parameters('name')),'2016-02-01-preview').key1]"
}
}
Cognitive Services API docs for listKeys
Upvotes: 1