github_repo_scraped
/
repos
/Azure-azure-sdk-for-python-c89899b
/sdk
/communication
/test-resources
/test-resources.json
{ | |
"$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" | |
}, | |
"communicationServicesEndpointSuffix": { | |
"defaultValue": ".communication.azure.com", | |
"type": "string" | |
}, | |
"testApplicationOid": { | |
"type": "string", | |
"metadata": { | |
"description": "The client OID to grant access to test resources." | |
} | |
}, | |
"tenantId": { | |
"type": "String", | |
"metadata": { | |
"description": "The tenant id to which the application and resources belong." | |
} | |
}, | |
"testApplicationId": { | |
"type": "String", | |
"metadata": { | |
"description": "The application client id used to run tests." | |
} | |
} | |
}, | |
"variables": { | |
"uniqueSubDomainName": "[format('{0}-{1}', parameters('baseName'), parameters('endpointPrefix'))]", | |
"contributorRoleId": "b24988ac-6180-42a0-ab88-20f7382dd24c" | |
}, | |
"resources": [ | |
{ | |
"type": "Microsoft.Communication/CommunicationServices", | |
"apiVersion": "2023-03-31", | |
"name": "[variables('uniqueSubDomainName')]", | |
"location": "global", | |
"properties": { | |
"dataLocation": "UnitedStates" | |
} | |
}, | |
{ | |
"type": "Microsoft.Authorization/roleAssignments", | |
"apiVersion": "2022-04-01", | |
"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": { | |
"AZURE_TENANT_ID": { | |
"type": "String", | |
"value": "[parameters('tenantId')]" | |
}, | |
"AZURE_CLIENT_ID": { | |
"type": "String", | |
"value": "[parameters('testApplicationId')]" | |
}, | |
"COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": { | |
"type": "string", | |
"value": "[listKeys(resourceId('Microsoft.Communication/CommunicationServices',variables('uniqueSubDomainName')), '2023-03-31').primaryConnectionString]" | |
}, | |
"COMMUNICATION_SERVICE_ENDPOINT": { | |
"type": "string", | |
"value": "[concat('https://', parameters('baseName'), '-', parameters('endpointPrefix'), parameters('communicationServicesEndpointSuffix'))]" | |
}, | |
"COMMUNICATION_SERVICE_ACCESS_KEY": { | |
"type": "string", | |
"value": "[listKeys(resourceId('Microsoft.Communication/CommunicationServices',variables('uniqueSubDomainName')), '2023-03-31').primaryKey]" | |
}, | |
"RESOURCE_GROUP_NAME": { | |
"type": "string", | |
"value": "[resourceGroup().Name]" | |
} | |
} | |
} | |