Skip to content

Commit

Permalink
Adding test-resources.json to communication sdk (Azure#15787)
Browse files Browse the repository at this point in the history
Co-authored-by: Minnie Liu <[email protected]>
  • Loading branch information
minnieliu and Minnie Liu authored Sep 29, 2020
1 parent 6b259d1 commit 4dbe7b8
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions sdk/communication/azure-communication-chat/test-resources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"baseName": {
"type": "string",
"defaultValue": "[resourceGroup().name]",
"metadata": {
"description": "The base resource name."
}
},
"endpointPrefix": {
"defaultValue": "communication",
"type": "string"
},
"testApplicationOid": {
"type": "string",
"metadata": {
"description": "The client OID to grant access to test resources."
}
}
},
"variables": {
"uniqueSubDomainName": "[format('{0}-{1}', parameters('baseName'), parameters('endpointPrefix'))]",
"contributorRoleId": "b24988ac-6180-42a0-ab88-20f7382dd24c"
},
"resources": [
{
"type": "Microsoft.Communication/CommunicationServices",
"apiVersion": "2020-08-20-preview",
"name": "[variables('uniqueSubDomainName')]",
"location": "global",
"properties": {
"dataLocation": "United States"
}
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2019-04-01-preview",
"name": "[guid(resourceGroup().id, deployment().name, parameters('baseName'), variables('contributorRoleId'))]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', variables('contributorRoleId'))]",
"principalId": "[parameters('testApplicationOid')]",
"scope": "[resourceGroup().id]"
}
}
],
"outputs": {
"COMMUNICATION_CONNECTION_STRING": {
"type": "string",
"value": "[listKeys(resourceId('Microsoft.Communication/CommunicationServices',variables('uniqueSubDomainName')), '2020-08-20-preview').primaryConnectionString]"
},
"RESOURCE_GROUP_NAME": {
"type": "string",
"value": "[resourceGroup().Name]"
}
}
}

0 comments on commit 4dbe7b8

Please sign in to comment.