-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazuredeploy.json
More file actions
171 lines (171 loc) · 7.37 KB
/
Copy pathazuredeploy.json
File metadata and controls
171 lines (171 loc) · 7.37 KB
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
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "2251608370322725418"
}
},
"parameters": {
"appName": {
"type": "string",
"defaultValue": "bg-group-sync",
"metadata": {
"description": "The name of the function app that you wish to create"
}
},
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_RAGRS"
],
"metadata": {
"description": "Storage Account type"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources"
}
},
"appInsightsLocation": {
"type": "string",
"defaultValue": "[parameters('location')]",
"metadata": {
"description": "Location for Application Insights"
}
},
"storageAccountName": {
"type": "string",
"defaultValue": "bggroupsync",
"metadata": {
"description": "Storage account name"
}
}
},
"variables": {
"copy": [
{
"name": "defaultSettingsArray",
"count": "[length(items(variables('defaultSettings')))]",
"input": {
"name": "[items(variables('defaultSettings'))[copyIndex('defaultSettingsArray')].key]",
"value": "[items(variables('defaultSettings'))[copyIndex('defaultSettingsArray')].value]"
}
}
],
"$fxv#0": {
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "node",
"FUNCTIONS_EXTENSION_VERSION": "~4",
"AzureWebJobsFeatureFlags": "EnableWorkerIndexing",
"AzureTaskHub": "bgGroupSync",
"SYNC_SCHEDULE": "0 0 0 * * *",
"SYNC_SCHEDULE_ENABLED": true,
"SYNC_STUDENTS": true,
"SYNC_PARENTS": true,
"SYNC_STUDENT_EMAILS": false,
"SYNC_CREATE_ACCOUNTS": false,
"BLACKBAUD_OAUTH_ID": "MUST_CHANGE_THIS",
"BLACKBAUD_OAUTH_SECRET": "MUST_CHANGE_THIS",
"BLACKBAUD_SUBSCRIPTION_KEY": "MUST_CHANGE_THIS",
"BLACKBAUD_STUDENT_ROLE": "Student",
"BLACKBAUD_PARENT_ROLE": "Parent",
"BLACKBAUD_PAST_PARENT_ROLES": "Parent of Past Student, Parent of Alumni",
"GOOGLE_DOMAIN": "MUST_CHANGE_THIS",
"GOOGLE_ACCOUNT_CREATION_PASSWORD": "TEMP_PASSWORD_CHANGE_THIS!",
"GOOGLE_ACCOUNT_CREATION_ORG_UNIT_PATH": "/Students",
"GOOGLE_ACCOUNT_CREATION_MIN_GRAD_YEAR": "",
"GOOGLE_STUDENT_GROUP_EMAIL_PREFIX": "students",
"GOOGLE_STUDENT_GROUP_NAME": "Class of ",
"GOOGLE_PARENT_GROUP_EMAIL_PREFIX": "parents",
"GOOGLE_PARENT_GROUP_NAME": "Parents of ",
"GOOGLE_AUTH_SERVICE_EMAIL": "MUST_CHANGE_THIS",
"GOOGLE_AUTH_SERVICE_KEY": "MUST_CHANGE_THIS",
"SMTP_REPORTS_ENABLED": false,
"SMTP_REPORT_FREQUENCY": "always",
"SMTP_TO_EMAIL": "MUST_CHANGE_THIS",
"SMTP_SEND_AS_EMAIL": "MUST_CHANGE_THIS",
"SMTP_HOST": "MUST_CHANGE_THIS",
"SMTP_PORT": 587,
"SMTP_USE_TLS": false,
"SMTP_USERNAME": "MUST_CHANGE_THIS",
"SMTP_PASSWORD": "MUST_CHANGE_THIS"
}
},
"defaultSettings": "[variables('$fxv#0').Values]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2022-09-01",
"name": "[parameters('storageAccountName')]",
"location": "[parameters('location')]",
"sku": {
"name": "[parameters('storageAccountType')]"
},
"kind": "Storage",
"properties": {
"supportsHttpsTrafficOnly": true,
"defaultToOAuthAuthentication": true
}
},
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2022-09-01",
"name": "[parameters('appName')]",
"location": "[parameters('location')]",
"sku": {
"name": "Y1",
"tier": "Dynamic"
},
"kind": "functionapp",
"properties": {
"reserved": true
}
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2022-09-01",
"name": "[parameters('appName')]",
"location": "[parameters('location')]",
"kind": "functionapp,linux",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('appName'))]",
"siteConfig": {
"appSettings": "[concat(createArray(createObject('name', 'AzureWebJobsStorage', 'value', format('DefaultEndpointsProtocol=https;AccountName={0};EndpointSuffix={1};AccountKey={2}', parameters('storageAccountName'), environment().suffixes.storage, listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2022-09-01').keys[0].value)), createObject('name', 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING', 'value', format('DefaultEndpointsProtocol=https;AccountName={0};EndpointSuffix={1};AccountKey={2}', parameters('storageAccountName'), environment().suffixes.storage, listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2022-09-01').keys[0].value)), createObject('name', 'WEBSITE_CONTENTSHARE', 'value', toLower(parameters('appName'))), createObject('name', 'APPINSIGHTS_INSTRUMENTATIONKEY', 'value', reference(resourceId('Microsoft.Insights/components', parameters('appName')), '2020-02-02').InstrumentationKey)), filter(variables('defaultSettingsArray'), lambda('setting', not(contains(toObject(createArray(createObject('name', 'AzureWebJobsStorage', 'value', format('DefaultEndpointsProtocol=https;AccountName={0};EndpointSuffix={1};AccountKey={2}', parameters('storageAccountName'), environment().suffixes.storage, listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2022-09-01').keys[0].value)), createObject('name', 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING', 'value', format('DefaultEndpointsProtocol=https;AccountName={0};EndpointSuffix={1};AccountKey={2}', parameters('storageAccountName'), environment().suffixes.storage, listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2022-09-01').keys[0].value)), createObject('name', 'WEBSITE_CONTENTSHARE', 'value', toLower(parameters('appName'))), createObject('name', 'APPINSIGHTS_INSTRUMENTATIONKEY', 'value', reference(resourceId('Microsoft.Insights/components', parameters('appName')), '2020-02-02').InstrumentationKey)), lambda('setting', lambdaVariables('setting').name)), lambdaVariables('setting').name)))))]",
"linuxFxVersion": "node|18"
},
"httpsOnly": true
},
"dependsOn": [
"[resourceId('Microsoft.Insights/components', parameters('appName'))]",
"[resourceId('Microsoft.Web/serverfarms', parameters('appName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
]
},
{
"type": "Microsoft.Insights/components",
"apiVersion": "2020-02-02",
"name": "[parameters('appName')]",
"location": "[parameters('appInsightsLocation')]",
"kind": "web",
"properties": {
"Application_Type": "web",
"Request_Source": "rest"
}
}
]
}