forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-resources.json
69 lines (69 loc) · 2.58 KB
/
test-resources.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"baseName": {
"type": "String"
},
"configurationStores_azconfig_java_name": {
"defaultValue": "azconfig-java",
"type": "String"
},
"endpointSuffix": {
"defaultValue": ".azconfig.io",
"type": "String"
},
"testApplicationOid": {
"type": "string",
"metadata": {
"description": "The principal to assign the role to. This is application object id."
}
},
"sku": {
"defaultValue": "Standard",
"type": "string",
"metadata": {
"description": "sku type defined here."
}
}
},
"variables": {
"roleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b')]",
"uniqueAzConfigName": "[concat(parameters('baseName'),'-' , parameters('configurationStores_azconfig_java_name'))]",
"endpointValue": "[concat('https://', parameters('baseName'), '-', parameters('configurationStores_azconfig_java_name'), parameters('endpointSuffix'))]",
"location": "[resourceGroup().location]"
},
"resources": [
{
"type": "Microsoft.AppConfiguration/configurationStores",
"apiVersion": "2019-10-01",
"name": "[variables('uniqueAzConfigName')]",
"location":"[resourceGroup().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": {
"AZURE_APPCONFIG_CONNECTION_STRING": {
"type": "string",
"value": "[listKeys(resourceId('Microsoft.AppConfiguration/configurationStores',variables('uniqueAzConfigName')), '2019-02-01-preview').value[0].connectionString]"
},
"roleDefinitionId": {
"type": "string",
"value": "[ variables('roleDefinitionId')]"
}
}
}