Skip to content

Commit beb064d

Browse files
committed
ARM template
1 parent c240e87 commit beb064d

File tree

1 file changed

+150
-0
lines changed

1 file changed

+150
-0
lines changed
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"functionAppName": {
6+
"type": "string",
7+
"defaultValue": "[concat('dfm-',uniqueString(resourceGroup().id))]",
8+
"metadata": {
9+
"description": "Name for the Function App, that will host your DFM instance. NOTE: there will be a NEW app created, and it will be different from the one that hosts your Durable Functions."
10+
}
11+
},
12+
"storageConnectionString": {
13+
"type": "securestring",
14+
"metadata": {
15+
"description": "Storage Connection String to the Storage where this Function App's code and configuration will be stored."
16+
}
17+
},
18+
"sqlConnectionString": {
19+
"type": "securestring",
20+
"metadata": {
21+
"description": "Connection String for the database your MSSQL storage provider is using. Copy it from your Durable Functions App Settings."
22+
}
23+
},
24+
"taskHubName": {
25+
"type": "string",
26+
"defaultValue": "",
27+
"metadata": {
28+
"description": "(optional) Comma-separated list of Task Hub names to be monitored. WARNING: if not set, this instance will expose ALL Task Hubs in your Storage account!"
29+
}
30+
},
31+
"applicationPackageUrl": {
32+
"type": "string",
33+
"defaultValue": "https://www.nuget.org/api/v2/package/DurableFunctionsMonitor.DotNetIsolated.MsSql",
34+
"metadata": {
35+
"description": "The DFM app will be deployed from this package (ZIP-file or Nuget package). You can override this URL, if you wish."
36+
}
37+
},
38+
"aadAppClientId": {
39+
"type": "string",
40+
"metadata": {
41+
"description": "In Azure Portal->Azure Active Directory->App Registrations create a new AAD App. Set its 'Redirect URI' setting to 'https://[your-function-app].azurewebsites.net/.auth/login/aad/callback'. Then on 'Authentication' page enable ID Tokens. Then copy that AAD App's ClientId into here."
42+
}
43+
},
44+
"aadAppTenantId": {
45+
"type": "string",
46+
"defaultValue": "[subscription().tenantId]",
47+
"metadata": {
48+
"description": "Put your AAD TenantId here (you can find it on Azure Portal->Azure Active Directory page), or leave as default to use the current subscription's TenantId."
49+
}
50+
},
51+
"allowedUserNames": {
52+
"type": "string",
53+
"metadata": {
54+
"description": "Comma-separated list of users (emails), that will be allowed to access this DFM instance. Specify at least yourself here."
55+
}
56+
}
57+
},
58+
"resources": [
59+
{
60+
"type": "Microsoft.Web/serverfarms",
61+
"apiVersion": "2016-09-01",
62+
"name": "[parameters('functionAppName')]",
63+
"location": "[resourceGroup().location]",
64+
"sku": {
65+
"name": "Y1",
66+
"tier": "Dynamic"
67+
},
68+
"properties": {
69+
"name": "[parameters('functionAppName')]",
70+
"computeMode": "Dynamic"
71+
}
72+
},
73+
74+
{
75+
"apiVersion": "2018-11-01",
76+
"type": "Microsoft.Web/sites",
77+
"name": "[parameters('functionAppName')]",
78+
"location": "[resourceGroup().location]",
79+
"kind": "functionapp",
80+
"dependsOn": [
81+
"[resourceId('Microsoft.Web/serverfarms', parameters('functionAppName'))]"
82+
],
83+
84+
"resources": [
85+
{
86+
"name": "[concat(parameters('functionAppName'), '/authsettings')]",
87+
"apiVersion": "2018-11-01",
88+
"type": "Microsoft.Web/sites/config",
89+
"location": "[resourceGroup().location]",
90+
"dependsOn": [
91+
"[resourceId('Microsoft.Web/sites', parameters('functionAppName'))]"
92+
],
93+
"properties": {
94+
"enabled": true,
95+
"unauthenticatedClientAction": "RedirectToLoginPage",
96+
"tokenStoreEnabled": true,
97+
"defaultProvider": "AzureActiveDirectory",
98+
"clientId": "[parameters('aadAppClientId')]",
99+
"issuer": "[concat('https://login.microsoftonline.com/', parameters('aadAppTenantId'), '/v2.0')]"
100+
}
101+
}
102+
],
103+
104+
"properties": {
105+
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('functionAppName'))]",
106+
"siteConfig": {
107+
"netFrameworkVersion": "v8.0",
108+
"appSettings": [
109+
{
110+
"name": "DFM_HUB_NAME",
111+
"value": "[parameters('taskHubName')]"
112+
},
113+
{
114+
"name": "DFM_ALLOWED_USER_NAMES",
115+
"value": "[parameters('allowedUserNames')]"
116+
},
117+
{
118+
"name": "DFM_SQL_CONNECTION_STRING",
119+
"value": "[parameters('sqlConnectionString')]"
120+
},
121+
{
122+
"name": "WEBSITE_RUN_FROM_PACKAGE",
123+
"value": "[parameters('applicationPackageUrl')]"
124+
},
125+
{
126+
"name": "AzureWebJobsStorage",
127+
"value": "[parameters('storageConnectionString')]"
128+
},
129+
{
130+
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
131+
"value": "[parameters('storageConnectionString')]"
132+
},
133+
{
134+
"name": "WEBSITE_CONTENTSHARE",
135+
"value": "[toLower(parameters('functionAppName'))]"
136+
},
137+
{
138+
"name": "FUNCTIONS_EXTENSION_VERSION",
139+
"value": "~4"
140+
},
141+
{
142+
"name": "FUNCTIONS_WORKER_RUNTIME",
143+
"value": "dotnet-isolated"
144+
}
145+
]
146+
}
147+
}
148+
}
149+
]
150+
}

0 commit comments

Comments
 (0)