Skip to content

Instantly share code, notes, and snippets.

View mjisaak's full-sized avatar
:octocat:
Working from home

Martin Brandl mjisaak

:octocat:
Working from home
View GitHub Profile
// The following will create an Azure Function app on
// a consumption plan, along with a storage account
param location string = resourceGroup().location
param functionRuntime string = 'dotnet'
param appNamePrefix string = uniqueString(resourceGroup().id)
var functionAppName = '${appNamePrefix}-functionapp'
var appServiceName = '${appNamePrefix}-appservice'
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "11544000819148750"
}
},
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"variables": {
"storageAccountName": "[concat('storeacc', uniqueString(resourceGroup().id))]",
"hostingPlanName": "[concat('asp', uniqueString(resourceGroup().id))]",
"location": "West Europe",
"functionOneName": "[concat('func1', uniqueString(resourceGroup().id))]",
"functionTwoName": "[concat('func2', uniqueString(resourceGroup().id))]",
"functionOneppId": "[concat(resourceGroup().id,'/providers/Microsoft.Web/sites/', variables('functionOneName'))]"