Create Function App and private endpoint-secured Storage

Last updated: 11/05/2021

This template allows you to deploy an Azure Function App that communicates with Azure Storage over private endpoints.

This Azure Resource Manager (ARM) template was created by a member of the community and not by Microsoft. Each ARM template is licensed to you under a licence agreement by its owner, not Microsoft. Microsoft is not responsible for ARM templates provided and licensed by community members and does not screen for security, compatibility or performance. Community ARM templates are not supported under any Microsoft support programme or service, and are made available AS IS without warranty of any kind.

Parameters

Parameter Name Description
Location Location to deploy resources to.
AppName Name of the Function App.
plan Name of the Elastic Premium Plan for the Function App.
skuName The Sku name/size of the Elastic Premium plan
vnetName Name of the VNET that the Function App and Storage account will communicate over.
functionsSubnetName The subnet that the Function App will use for VNET traffic.
storagePESubnetName The subnet that will be used for the Storage private endpoints.
StorageAccountName Name of the Storage account that the Function App will use for operations and content.
virtualNetworkAddressPrefix VNET address space.
functionSubnetAddressPrefix Function App's subnet address range.
privateEndpointSubnetAddressPrefix Storage account's private endpoint's subnet address range.
postDeploymentScript An optional script to run after resource deployment to help ensure that the Functions host is able to start after the content share is pointing to the secured Storage account. This script will make an authenticated GET request to the Function App's Kudu site. If none is specified, this script won't be run.
identityName Name of an existing user managed identity used to run the optional deployment script. This parameter will be ignored if you specify none for the postDeploymentScript parameter.
identityNameResourceGroup Resource group of existing user managed identity used to run the optional deployment script. This parameter will be ignored if you specify none for the postDeploymentScript parameter.

Use the template

PowerShell

New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deployment
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/function-app-storage-private-endpoints/azuredeploy.json
Installing and configuring Azure PowerShell

Command line

az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deployment
az group deployment create --resource-group <my-resource-group> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/function-app-storage-private-endpoints/azuredeploy.json
Installing and configuring the Azure cross-platform command-line interface