Skip to content
Latchkey

az functionapp create: Create a Function App

az functionapp create provisions an Azure Functions app on a consumption or premium plan.

Serverless deploys start with a function app backed by a storage account. functionapp create wires the two together and sets the runtime stack.

What it does

az functionapp create provisions a Functions app, attaching a storage account for runtime state and choosing a hosting plan. On consumption you pass --consumption-plan-location; the runtime stack and version come from --runtime and --functions-version.

Common usage

Terminal
az functionapp create \
  --resource-group rg-app --name func-ci \
  --storage-account stappci20260630 \
  --consumption-plan-location eastus \
  --runtime node --runtime-version 20 \
  --functions-version 4

Subcommands and flags

FlagWhat it does
--name, -nFunction app name (global hostname)
--storage-accountBacking storage account
--consumption-plan-locationRegion for a consumption plan
--runtimenode, python, dotnet, java, etc.
--runtime-versionStack version, e.g. 20 for Node
--functions-versionFunctions host version, e.g. 4

In CI

Create the storage account first; the function app depends on it. After creation, set app settings with az webapp config appsettings set (function apps share that surface) and deploy code with a publish step. The identity needs Contributor on the group.

Common errors in CI

"Storage account ... not found" means --storage-account is wrong or in another group. "WebsiteName ... is not available" means the global name is taken. A bad --runtime-version for the chosen --functions-version is rejected with an unsupported combination error; check the supported matrix.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →