forked from alertlogic/azure-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.json
188 lines (188 loc) · 7.86 KB
/
template.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Name": {
"type": "String"
},
"Storage Name": {
"type": "String"
},
"Alert Logic Access Key ID": {
"type": "String"
},
"Alert Logic Secret Key": {
"type": "SecureString"
},
"Alert Logic API endpoint": {
"type": "String",
"defaultValue": "api.global-services.global.alertlogic.com",
"allowedValues" : [
"api.global-services.global.alertlogic.com"
]
},
"Alert Logic Data Residency": {
"type": "String",
"defaultValue": "default",
"allowedValues": [
"default"
]
},
"Office365 Content Streams": {
"type": "Array",
"defaultValue": ["Audit.AzureActiveDirectory", "Audit.Exchange", "Audit.SharePoint", "Audit.General"]
},
"Service Principal ID": {
"type": "String"
},
"App Client ID": {
"type": "String"
},
"App Client Secret": {
"type": "SecureString"
}
},
"variables": {
"location": "[resourceGroup().location]",
"resourceGroupName": "[resourceGroup().name]",
"resourceGroupId": "[resourceGroup().id]",
"roleAssignmentId": "[guid(uniqueString( resourceGroup().id, deployment().name ))]",
"subscriptionId": "[split(subscription().id, '/')[2]]",
"tenantId": "[subscription().tenantId]",
"contributor": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
"repo": "https://github.com/alertlogic/azure-collector.git",
"branch": "master"
},
"resources": [
{
"type": "Microsoft.Web/sites",
"kind": "functionapp",
"name": "[parameters('name')]",
"apiVersion": "2016-03-01",
"location": "[variables('location')]",
"properties": {
"name": "[parameters('name')]",
"siteConfig": {
"appSettings": [
{
"name": "AzureWebJobsDashboard",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('Storage Name'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('Storage Name')), '2015-06-15').key1)]"
},
{
"name": "AzureWebJobsStorage",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('Storage Name'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('Storage Name')), '2015-06-15').key1)]"
},
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~1"
},
{
"name": "SCM_USE_FUNCPACK",
"value": "1"
},
{
"name": "SCM_POST_DEPLOYMENT_ACTIONS_PATH",
"value": "PostDeploymentActions"
},
{
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('Storage Name'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('Storage Name')), '2015-06-15').key1)]"
},
{
"name": "WEBSITE_CONTENTSHARE",
"value": "[concat(toLower(parameters('name')), '9546')]"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "6.5.0"
},
{
"name": "O365_CONTENT_STREAMS",
"value": "[string(parameters('Office365 Content Streams'))]"
},
{
"name": "APP_SUBSCRIPTION_ID",
"value": "[variables('subscriptionId')]"
},
{
"name": "APP_RESOURCE_GROUP",
"value": "[variables('resourceGroupName')]"
},
{
"name": "APP_TENANT_ID",
"value": "[variables('tenantId')]"
}
],
"connectionStrings": [
{
"name": "APP_CLIENT_ID",
"type": "Custom",
"connectionString": "[parameters('App Client ID')]"
},
{
"name": "APP_CLIENT_SECRET",
"type": "Custom",
"connectionString": "[parameters('App Client Secret')]"
},
{
"name": "APP_CI_ACCESS_KEY_ID",
"type": "Custom",
"connectionString": "[parameters('Alert Logic Access Key ID')]"
},
{
"name": "APP_CI_SECRET_KEY",
"type": "Custom",
"connectionString": "[parameters('Alert Logic Secret Key')]"
},
{
"name": "APP_AL_API_ENDPOINT",
"type": "Custom",
"connectionString": "[parameters('Alert Logic API endpoint')]"
},
{
"name": "APP_AL_RESIDENCY",
"type": "Custom",
"connectionString": "[parameters('Alert Logic Data Residency')]"
}
]
},
"clientAffinityEnabled": false
},
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('Storage Name'))]"
],
"resources": [{
"apiVersion": "2015-08-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('name'))]"
],
"properties": {
"RepoUrl": "[variables('repo')]",
"branch": "[variables('branch')]",
"IsManualIntegration": true
}
}]
},
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[parameters('Storage Name')]",
"apiVersion": "2015-06-15",
"location": "[variables('location')]",
"properties": {
"accountType": "Standard_LRS"
}
},
{
"type": "Microsoft.Authorization/roleAssignments",
"name": "[variables('roleAssignmentId')]",
"apiVersion": "2015-07-01",
"properties": {
"roleDefinitionId": "[variables('contributor')]",
"principalId": "[parameters('Service Principal ID')]",
"scope": "[variables('resourceGroupId')]"
}
}
]
}