Created
June 28, 2023 17:28
-
-
Save ChrisRomp/fe7be24b07bc9b1140610d1c0ee81b70 to your computer and use it in GitHub Desktop.
Azure ASEv3 Function App
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
#!/bin/bash | |
# Vars | |
RG=TEST-asev3 | |
LOC=westus3 | |
VNET_NAME=vnet-asev3 | |
VNET_CIDR=10.0.0.0/16 | |
SUBNET_NAME=subnet-vnet-asev3-00 | |
SUBNET_CIDR=10.0.0.0/24 | |
ASE_NAME=cr1asev3a01 | |
ASP_NAME=asp-cr1-asev3 | |
STORAGE_ACCOUNT_NAME=storcr1asev301a | |
FUNCTION_APP_NAME=func-cr1-asev301a | |
# Create RG | |
az group create -n $RG -l $LOC | |
# Create VNET | |
az network vnet create \ | |
-g $RG \ | |
-n $VNET_NAME \ | |
--address-prefix $VNET_CIDR \ | |
--subnet-name $SUBNET_NAME \ | |
--subnet-prefix $SUBNET_CIDR | |
# Create ASE with external access | |
az appservice ase create \ | |
-n $ASE_NAME \ | |
-g $RG \ | |
--vnet-name $VNET_NAME \ | |
--subnet $SUBNET_NAME \ | |
--kind asev3 \ | |
--virtual-ip-type External | |
# Create Windows app service in ASE | |
az appservice plan create \ | |
-g $RG \ | |
-n $ASP_NAME \ | |
--app-service-environment $ASE_NAME \ | |
--sku I1V2 | |
# Create storage account | |
az storage account create \ | |
-g $RG \ | |
-n $STORAGE_ACCOUNT_NAME \ | |
--sku Standard_LRS \ | |
--https-only true \ | |
--kind StorageV2 \ | |
--allow-blob-public-access false | |
# Create function app in ASP | |
az functionapp create \ | |
-g $RG \ | |
-n $FUNCTION_APP_NAME \ | |
--storage-account $STORAGE_ACCOUNT_NAME \ | |
--plan $ASP_NAME \ | |
--functions-version 4 \ | |
--runtime dotnet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment