{ "$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." } }, "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." } }, "testApplicationOid": { "type": "string", "metadata": { "description": "The client OID to grant access to test resources." } }, "location": { "type": "string", "defaultValue": "[resourceGroup().location]", "metadata": { "description": "The location of the resource. By default, this is the same as the resource group." } }, "sku": { "defaultValue": "Standard", "type": "string" }, "azConfigPrefix": { "defaultValue": "azconfig-resource-js", "type": "string" }, "azConfigEndpointSuffix": { "defaultValue": ".azconfig.io", "type": "string" } }, "variables": { "configurationApiVersion": "2019-10-01", "roleDefinitionId": "[format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b', subscription().subscriptionId)]", "uniqueAzConfigName": "[format('{0}-{1}', parameters('baseName'), parameters('azConfigPrefix'))]", "endpointValue": "[format('https://{0}-{1}{2}', parameters('baseName'), parameters('azConfigPrefix'), parameters('azConfigEndpointSuffix'))]" }, "resources": [ { "type": "Microsoft.AppConfiguration/configurationStores", "apiVersion": "[variables('configurationApiVersion')]", "name": "[variables('uniqueAzConfigName')]", "location": "[parameters('location')]", "sku": { "name": "[parameters('sku')]" }, "properties": { "endpoint": "[variables('endpointValue')]" } }, { "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2018-09-01-preview", "name": "[guid(resourceGroup().id)]", "properties": { "roleDefinitionId": "[variables('roleDefinitionId')]", "principalId": "[parameters('testApplicationOid')]" } } ], "outputs": { "AZ_CONFIG_ENDPOINT": { "type": "string", "value": "[variables('endpointValue')]" }, } }