270 строки
12 KiB
JSON
270 строки
12 KiB
JSON
{
|
|
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {
|
|
"FunctionName": {
|
|
"defaultValue": "[concat('ZoomLogs',uniqueString(subscription().subscriptionId))]",
|
|
"type": "string"
|
|
},
|
|
"customLogName": {
|
|
"type": "string",
|
|
"defaultValue": "Zoom"
|
|
},
|
|
"workspaceID": {
|
|
"type": "string",
|
|
"defaultValue": "<workspaceID>"
|
|
},
|
|
"workspaceKey": {
|
|
"type": "string",
|
|
"defaultValue": "<workspaceKey>"
|
|
},
|
|
"ZoomVerification": {
|
|
"type": "string",
|
|
"defaultValue": "None"
|
|
},
|
|
"ZoomSecretToken": {
|
|
"type": "string",
|
|
"defaultValue": "None"
|
|
},
|
|
"AppInsightsWorkspaceResourceID": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "Migrate Classic Application Insights to Log Analytic Workspace which is retiring by 29 Febraury 2024. Use 'Log Analytic Workspace-->Properties' blade having 'Resource ID' property value. This is a fully qualified resourceId which is in format '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'"
|
|
}
|
|
}
|
|
},
|
|
"variables": {},
|
|
"resources": [
|
|
{
|
|
"type": "Microsoft.Insights/components",
|
|
"apiVersion": "2020-02-02",
|
|
"name": "[parameters('FunctionName')]",
|
|
"location": "[resourceGroup().location]",
|
|
"kind": "web",
|
|
"properties": {
|
|
"Application_Type": "web",
|
|
"ApplicationId": "[parameters('FunctionName')]",
|
|
"WorkspaceResourceId": "[parameters('AppInsightsWorkspaceResourceID')]"
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.KeyVault/vaults",
|
|
"apiVersion": "2016-10-01",
|
|
"name": "[parameters('FunctionName')]",
|
|
"location": "[resourceGroup().location]",
|
|
"properties": {
|
|
"sku": {
|
|
"family": "A",
|
|
"name": "standard"
|
|
},
|
|
"tenantId": "[subscription().tenantId]",
|
|
"enabledForDeployment": false,
|
|
"enabledForDiskEncryption": false,
|
|
"enabledForTemplateDeployment": true,
|
|
"enableSoftDelete": true,
|
|
"accessPolicies": []
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.KeyVault/vaults/secrets",
|
|
"apiVersion": "2016-10-01",
|
|
"name": "[concat(parameters('FunctionName'), '/workspaceKey')]",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.KeyVault/vaults', parameters('FunctionName'))]"
|
|
],
|
|
"properties": {
|
|
"value": "[parameters('workspaceKey')]",
|
|
"contentType": "string",
|
|
"attributes": {
|
|
"enabled": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.Storage/storageAccounts",
|
|
"apiVersion": "2019-06-01",
|
|
"name": "[tolower(parameters('FunctionName'))]",
|
|
"location": "[resourceGroup().location]",
|
|
"sku": {
|
|
"name": "Standard_LRS",
|
|
"tier": "Standard"
|
|
},
|
|
"kind": "StorageV2",
|
|
"properties": {
|
|
"networkAcls": {
|
|
"bypass": "AzureServices",
|
|
"virtualNetworkRules": [],
|
|
"ipRules": [],
|
|
"defaultAction": "Allow"
|
|
},
|
|
"supportsHttpsTrafficOnly": true,
|
|
"encryption": {
|
|
"services": {
|
|
"file": {
|
|
"keyType": "Account",
|
|
"enabled": true
|
|
},
|
|
"blob": {
|
|
"keyType": "Account",
|
|
"enabled": true
|
|
}
|
|
},
|
|
"keySource": "Microsoft.Storage"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.Web/serverfarms",
|
|
"apiVersion": "2018-02-01",
|
|
"name": "[parameters('FunctionName')]",
|
|
"location": "[resourceGroup().location]",
|
|
"sku": {
|
|
"name": "Y1",
|
|
"tier": "Dynamic"
|
|
},
|
|
"kind": "functionapp",
|
|
"properties": {
|
|
"name": "[parameters('FunctionName')]",
|
|
"workerSize": "0",
|
|
"workerSizeId": "0",
|
|
"numberOfWorkers": "1"
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.Storage/storageAccounts/blobServices",
|
|
"apiVersion": "2019-06-01",
|
|
"name": "[concat(parameters('FunctionName'), '/default')]",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Storage/storageAccounts', tolower(parameters('FunctionName')))]"
|
|
],
|
|
"sku": {
|
|
"name": "Standard_LRS",
|
|
"tier": "Standard"
|
|
},
|
|
"properties": {
|
|
"cors": {
|
|
"corsRules": []
|
|
},
|
|
"deleteRetentionPolicy": {
|
|
"enabled": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.Storage/storageAccounts/fileServices",
|
|
"apiVersion": "2019-06-01",
|
|
"name": "[concat(parameters('FunctionName'), '/default')]",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Storage/storageAccounts', tolower(parameters('FunctionName')))]"
|
|
],
|
|
"sku": {
|
|
"name": "Standard_LRS",
|
|
"tier": "Standard"
|
|
},
|
|
"properties": {
|
|
"cors": {
|
|
"corsRules": []
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.Web/sites",
|
|
"apiVersion": "2018-11-01",
|
|
"name": "[parameters('FunctionName')]",
|
|
"location": "[resourceGroup().location]",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Storage/storageAccounts', tolower(parameters('FunctionName')))]",
|
|
"[resourceId('Microsoft.Web/serverfarms', parameters('FunctionName'))]",
|
|
"[resourceId('Microsoft.KeyVault/vaults', parameters('FunctionName'))]",
|
|
"[resourceId('Microsoft.Insights/components', parameters('FunctionName'))]"
|
|
],
|
|
"kind": "functionapp",
|
|
"identity": {
|
|
"type": "SystemAssigned"
|
|
},
|
|
"properties": {
|
|
"name": "[parameters('FunctionName')]",
|
|
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('FunctionName'))]",
|
|
"httpsOnly": true,
|
|
"clientAffinityEnabled": true,
|
|
"siteConfig": {
|
|
"powerShellVersion": "~7"
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"apiVersion": "2018-11-01",
|
|
"type": "config",
|
|
"name": "appsettings",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.Web/sites/', parameters('FunctionName'))]"
|
|
],
|
|
"properties": {
|
|
"FUNCTIONS_EXTENSION_VERSION": "~4",
|
|
"FUNCTIONS_WORKER_RUNTIME": "powershell",
|
|
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.insights/components', parameters('FunctionName')), '2015-05-01').InstrumentationKey]",
|
|
"APPLICATIONINSIGHTS_CONNECTION_STRING": "[reference(resourceId('microsoft.insights/components', parameters('FunctionName')), '2015-05-01').ConnectionString]",
|
|
"AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', toLower(parameters('FunctionName')),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', toLower(parameters('FunctionName'))), '2019-06-01').keys[0].value, ';EndpointSuffix=core.windows.net')]",
|
|
"WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "[concat('DefaultEndpointsProtocol=https;AccountName=', toLower(parameters('FunctionName')),';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', toLower(parameters('FunctionName'))), '2019-06-01').keys[0].value, ';EndpointSuffix=core.windows.net')]",
|
|
"WEBSITE_CONTENTSHARE": "[toLower(parameters('FunctionName'))]",
|
|
"customLogName": "[parameters('customLogName')]",
|
|
"workspaceID": "[parameters('workspaceID')]",
|
|
"workspaceKey": "[concat('@Microsoft.KeyVault(SecretUri=', reference(resourceId('Microsoft.KeyVault/vaults/secrets', parameters('FunctionName'), 'workspaceKey')).SecretUriWithVersion, ')')]",
|
|
"WEBSITE_RUN_FROM_PACKAGE": "https://aka.ms/sentinel-zoom-functionappV2",
|
|
"ZoomVerification": "[parameters('ZoomVerification')]",
|
|
"ZoomSecretToken": "[parameters('ZoomSecretToken')]"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "Microsoft.Web/sites/hostNameBindings",
|
|
"apiVersion": "2018-11-01",
|
|
"name": "[concat(parameters('FunctionName'), '/', parameters('FunctionName'), '.azurewebsites.net')]",
|
|
"location": "[resourceGroup().location]",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Web/sites', parameters('FunctionName'))]"
|
|
],
|
|
"properties": {
|
|
"siteName": "[parameters('FunctionName')]",
|
|
"hostNameType": "Verified"
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
|
|
"apiVersion": "2019-06-01",
|
|
"name": "[concat(parameters('FunctionName'), '/default/azure-webjobs-hosts')]",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('FunctionName'), 'default')]",
|
|
"[resourceId('Microsoft.Storage/storageAccounts', parameters('FunctionName'))]"
|
|
],
|
|
"properties": {
|
|
"publicAccess": "None"
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
|
|
"apiVersion": "2019-06-01",
|
|
"name": "[concat(parameters('FunctionName'), '/default/azure-webjobs-secrets')]",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('FunctionName'), 'default')]",
|
|
"[resourceId('Microsoft.Storage/storageAccounts', parameters('FunctionName'))]"
|
|
],
|
|
"properties": {
|
|
"publicAccess": "None"
|
|
}
|
|
},
|
|
{
|
|
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
|
|
"apiVersion": "2019-06-01",
|
|
"name": "[concat(parameters('FunctionName'), '/default/', tolower(parameters('FunctionName')))]",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Storage/storageAccounts/fileServices', parameters('FunctionName'), 'default')]",
|
|
"[resourceId('Microsoft.Storage/storageAccounts', parameters('FunctionName'))]"
|
|
],
|
|
"properties": {
|
|
"shareQuota": 5120
|
|
}
|
|
}
|
|
]
|
|
} |