-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
azuredeploy.json
125 lines (125 loc) · 4.52 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"variables": {
"storageName": "[concat(resourceGroup().name, 'storage')]",
"serviceBusName": "[concat(resourceGroup().name, 'sb')]",
"eventHubInputName": "[concat(resourceGroup().name, 'input')]",
"eventHubEvalName": "[concat(resourceGroup().name, 'eval')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageName')]",
"apiVersion": "2015-06-15",
"location": "[resourceGroup().location]",
"properties": {
"accountType": "Standard_LRS"
}
},
{
"apiVersion": "2015-08-01",
"name": "[concat(variables('serviceBusName'))]",
"type": "Microsoft.ServiceBus/namespaces",
"location": "[resourceGroup().location]",
"kind": "Messaging",
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 1
},
"resources": [
{
"apiVersion": "2015-08-01",
"name": "[concat(variables('serviceBusName'), '/', 'OwnerKey')]",
"type": "Microsoft.ServiceBus/namespaces/authorizationRules",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.ServiceBus/namespaces/', variables('serviceBusName'))]"
],
"properties": {
"KeyName": "OwnerKey",
"ClaimType": "SharedAccessKey",
"ClaimValue": "None",
"Rights": [ "listen", "send", "manage" ],
"Revision": -1
}
}
]
},
{
"apiVersion": "2015-08-01",
"name": "[concat(variables('serviceBusName'), '/', variables('eventHubInputName'))]",
"type": "Microsoft.ServiceBus/namespaces/eventHubs",
"location": "[resourceGroup().location]",
"properties": {
"path": "[variables('eventHubInputName')]",
"MessageRetentionInDays": 7,
"PartitionCount": 2
},
"dependsOn": [
"[concat('Microsoft.ServiceBus/namespaces/', variables('serviceBusName'))]"
],
"resources": [
{
"apiVersion": "2015-08-01",
"name": "Manage",
"type": "AuthorizationRules",
"dependsOn": [
"[concat(resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusName')), '/eventHubs/', variables('eventHubInputName'))]"
],
"properties": {
"keyName": "Manage",
"claimType": "SharedAccessKey",
"claimValue": "None",
"rights": [ "Send", "Listen", "Manage" ]
}
}
]
},
{
"apiVersion": "2015-08-01",
"name": "[concat(variables('serviceBusName'), '/', variables('eventHubEvalName'))]",
"type": "Microsoft.ServiceBus/namespaces/eventHubs",
"location": "[resourceGroup().location]",
"properties": {
"path": "[variables('eventHubEvalName')]",
"MessageRetentionInDays": 7,
"PartitionCount": 2
},
"dependsOn": [
"[concat('Microsoft.ServiceBus/namespaces/', variables('serviceBusName'))]"
],
"resources": [
{
"apiVersion": "2015-08-01",
"name": "Manage",
"type": "AuthorizationRules",
"dependsOn": [
"[concat(resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusName')), '/eventHubs/', variables('eventHubEvalName'))]"
],
"properties": {
"keyName": "Manage",
"claimType": "SharedAccessKey",
"claimValue": "None",
"rights": [ "Send", "Listen", "Manage" ]
}
}
]
}
],
"outputs": {
"storageConnectionString": {
"type": "string",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageName')), '2015-06-15').key1)]"
},
"eventHubInputConnectionString": {
"type": "string",
"value": "[listkeys(resourceId('Microsoft.ServiceBus/namespaces/eventhubs/authorizationRules', variables('serviceBusName'), variables('eventHubInputName'), 'Manage'), '2015-08-01').primaryConnectionString]"
},
"eventHubEvalConnectionString": {
"type": "string",
"value": "[listkeys(resourceId('Microsoft.ServiceBus/namespaces/eventhubs/authorizationRules', variables('serviceBusName'), variables('eventHubEvalName'), 'Manage'), '2015-08-01').primaryConnectionString]"
}
}
}