Skip to content

Commit 046382a

Browse files
committed
Create function app script
1 parent d7fc7ec commit 046382a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

create-function-app.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
. ./azure.env
6+
7+
# set Azure location to us-east unless it is set to something different already
8+
AZURE_STORAGE_ACCOUNT="${AZURE_STORAGE_ACCOUNT:-teamssecretnotifier001sa}"
9+
10+
az account set --subscription "${AZURE_SUBSCRIPTION_ID}"
11+
az group create --name "${AZURE_RESOURCE_GROUP}" --location "${AZURE_LOCATION}"
12+
az storage account create --name "${AZURE_STORAGE_ACCOUNT}" --location "${AZURE_LOCATION}" --resource-group "${AZURE_RESOURCE_GROUP}" --sku Standard_LRS
13+
az functionapp create --resource-group "${AZURE_RESOURCE_GROUP}" --consumption-plan-location "${AZURE_LOCATION}" --runtime node --runtime-version 20 --functions-version 4 --name "${AZURE_FUNCTION_APP_NAME}" --storage-account "${AZURE_STORAGE_ACCOUNT}"

0 commit comments

Comments
 (0)