-
Notifications
You must be signed in to change notification settings - Fork 1
/
func-app-config.json
88 lines (88 loc) · 4.3 KB
/
func-app-config.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
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"funcname": {
"type": "string"
},
"storageName": {
"type": "string"
},
"vmDetailsStorageName":{
"type": "string"
},
"ClientId": {
"type": "securestring",
"metadata": {
"description": "Service Principal Id which can be used by functions to create VMs"
}
},
"ClientSecret": {
"type": "securestring",
"metadata": {
"description": "Service Principal Secret which can be used by functions to create VMs"
}
},
"DefaultVMImage": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "If you want server VMs to be deployed with default image, specify it in this parameter. You can override it during deployment of specific VM"
}
},
"GameServerPortRange": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "If your game server needs specific port range by default, specify it here. You can override this during deployment of specific VM"
}
},
"hostingPlanName": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2016-03-01",
"name": "[parameters('funcname')]",
"type": "Microsoft.Web/Sites",
"properties": {
"name": "[parameters('funcname')]",
"siteConfig": {},
"clientAffinityEnabled": false,
"serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"hostingEnvironment": ""
},
"resources": [
{
"apiVersion": "2015-08-01",
"name": "appsettings",
"type": "config",
"dependsOn": [
"[resourceId(subscription().subscriptionId, resourceGroup().name, 'Microsoft.Web/Sites', parameters('funcname'))]"
],
"properties": {
"AzureWebJobsDashboard": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageName')), '2015-05-01-preview').key1)]",
"AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageName')), '2015-05-01-preview').key1)]",
"FUNCTIONS_EXTENSION_VERSION": "~1",
"WEBSITE_NODE_DEFAULT_VERSION": "6.5.0",
"SubscriptionId": "[subscription().subscriptionId]",
"Tenant": "[subscription().tenantId]",
"ClientId": "[parameters('ClientId')]",
"ClientSecret": "[parameters('ClientSecret')]",
"GAMESERVER_VM_IMAGE": "[parameters('DefaultVMImage')]",
"GAMESERVER_PORT_RANGE": "[parameters('GameServerPortRange')]",
"REPORT_GAMEROOMS_URL": "[listsecrets(resourceId('Microsoft.Web/sites/functions', parameters('funcname'), 'ReportGameRooms'),'2015-08-01').trigger_url]",
"APPINSIGHTS_INSTRUMENTATIONKEY":"[reference(resourceId('microsoft.insights/components/', parameters('funcname')), '2015-05-01').InstrumentationKey]",
"VMDETAILSSTORAGE": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('vmDetailsStorageName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('vmDetailsStorageName')), '2015-05-01-preview').key1)]"
}
}
],
"location": "[parameters('location')]",
"kind": "functionapp"
}
]
}