Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
220 lines (219 sloc) 7.91 KB
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appName": {
"type": "string",
"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."
}
},
"runtime": {
"type": "string",
"defaultValue": "node",
"allowedValues": ["node", "dotnet", "java"],
"metadata": {
"description": "The language worker runtime to load in the function app."
}
},
"repoUrl": {
"type": "string"
},
"branch": {
"type": "string",
"defaultValue": "master"
},
"TENANT": {
"type": "string"
},
"TENANT_NAME": {
"type": "string"
},
"CLIENT_ID": {
"type": "string"
},
"CLIENT_SECRET": {
"type": "string"
},
"TEMPLATE_SITE_URL": {
"type": "string"
},
"TEMPLATE_LIB_NAME": {
"type": "string"
}
},
"variables": {
"functionAppName": "[parameters('appName')]",
"hostingPlanName": "[parameters('appName')]",
"applicationInsightsName": "[parameters('appName')]",
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'azfunctions')]",
"storageAccountid": "[concat(resourceGroup().id,'/providers/','Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
"functionWorkerRuntime": "[parameters('runtime')]",
"createRequestQueueName": "[concat('https://', variables('storageAccountName'),'.queue.core.windows.net/create-team-request-queue')]",
"createCompletionQueueName": "[concat('https://', variables('storageAccountName'),'.queue.core.windows.net/create-team-completion-queue')]",
"cloneRequestQueueName": "[concat('https://', variables('storageAccountName'),'.queue.core.windows.net/clone-team-request-queue')]",
"cloneCompletionQueueName": "[concat('https://', variables('storageAccountName'),'.queue.core.windows.net/clone-team-completion-queue')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2016-12-01",
"location": "[parameters('location')]",
"kind": "Storage",
"sku": {
"name": "[parameters('storageAccountType')]"
}
},
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2015-04-01",
"name": "[variables('hostingPlanName')]",
"location": "[parameters('location')]",
"properties": {
"name": "[variables('hostingPlanName')]",
"computeMode": "Dynamic",
"sku": "Dynamic"
}
},
{
"apiVersion": "2015-08-01",
"type": "Microsoft.Web/sites",
"identity": {
"type": "SystemAssigned"
},
"name": "[variables('functionAppName')]",
"location": "[parameters('location')]",
"kind": "functionapp",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
],
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]",
"siteConfig": {
"appSettings": [
{
"name": "AzureWebJobsDashboard",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]"
},
{
"name": "AzureWebJobsStorage",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]"
},
{
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]"
},
{
"name": "WEBSITE_CONTENTSHARE",
"value": "[toLower(variables('functionAppName'))]"
},
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~2"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "8.11.1"
},
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(resourceId('microsoft.insights/components/', variables('applicationInsightsName')), '2015-05-01').InstrumentationKey]"
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "[variables('functionWorkerRuntime')]"
},
{
"name": "CREATE_REQUEST_QUEUE_NAME",
"value": "[variables('createRequestQueueName')]"
},
{
"name": "CREATE_COMPLETION_QUEUE_NAME",
"value": "[variables('createCompletionQueueName')]"
},
{
"name": "CLONE_REQUEST_QUEUE_NAME",
"value": "[variables('cloneRequestQueueName')]"
},
{
"name": "CLONE_COMPLETION_QUEUE_NAME",
"value": "[variables('cloneCompletionQueueName')]"
},
{
"name": "TENANT",
"value": "[parameters('TENANT')]"
},
{
"name": "TENANT_NAME",
"value": "[parameters('TENANT_NAME')]"
},
{
"name": "CLIENT_ID",
"value": "[parameters('CLIENT_ID')]"
},
{
"name": "CLIENT_SECRET",
"value": "[parameters('CLIENT_SECRET')]"
},
{
"name": "TEMPLATE_SITE_URL",
"value": "[parameters('TEMPLATE_SITE_URL')]"
},
{
"name": "TEMPLATE_LIB_NAME",
"value": "[parameters('TEMPLATE_LIB_NAME')]"
}
]
}
},
"resources": [
{
"name": "web",
"type": "sourcecontrols",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('functionAppName'))]"
],
"tags": {
"displayName": "Github"
},
"properties": {
"RepoUrl": "[parameters('repoUrl')]",
"branch": "[parameters('branch')]",
"IsManualIntegration": true
}
}
]
},
{
"apiVersion": "2018-05-01-preview",
"name": "[variables('applicationInsightsName')]",
"type": "microsoft.insights/components",
"location": "East US",
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', variables('applicationInsightsName'))]": "Resource"
},
"properties": {
"ApplicationId": "[variables('applicationInsightsName')]",
"Request_Source": "IbizaWebAppExtensionCreate"
}
}
]
}
You can’t perform that action at this time.