Last active
August 26, 2019 12:46
-
-
Save staslebedenko/69a99991d3f1af7fa305c1d1f0c4a6c3 to your computer and use it in GitHub Desktop.
Azure cli for function app with staging slot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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