Skip to content

Instantly share code, notes, and snippets.

@staslebedenko
Last active August 26, 2019 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save staslebedenko/69a99991d3f1af7fa305c1d1f0c4a6c3 to your computer and use it in GitHub Desktop.
Save staslebedenko/69a99991d3f1af7fa305c1d1f0c4a6c3 to your computer and use it in GitHub Desktop.
Azure cli for function app with staging slot
location=northeurope
functionsGroupName=atom-serverless-2019
az group create --name $functionsGroupName --location $location
functionsStorAccName=atomserv2019
storageAccountSku=Standard_LRS
az storage account create --name $functionsStorAccName --location $location \
--resource-group $functionsGroupName --sku $storageAccountSku
location=northeurope
insightsGroupName=atom-serverless-2019
insightsName=atom-telemetry
az resource create --resource-group $insightsGroupName --name $insightsName --resource-type "Microsoft.Insights/components" --location $location --properties '{"Application_Type":"web"}'
insightsKey=$(az resource show -g $insightsGroupName -n $insightsName --resource-type "Microsoft.Insights/components" --query properties.InstrumentationKey)
functionsGroupName=atom-serverless-2019
functionsStorAccName=atomserv2019
functionAppName=AtomServ2019
runtime=dotnet
location=northeurope
az functionapp create --resource-group $functionsGroupName \
--name $functionAppName --storage-account $functionsStorAccName --runtime $runtime \
--app-insights-key $insightsKey --consumption-plan-location $location
az functionapp deployment slot create --resource-group $functionsGroupName \
--name $functionAppName --slot staging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment