File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 33set -euo pipefail
44
55# Make sure these values are correct for your environment
6- resourceGroup=" azure-sql-db-python-rest- api"
7- appName=" azure-sql-db-python-rest- api"
6+ resourceGroup=" dm- api-01 "
7+ appName=" dm- api-01 "
88location=" WestUS2"
99
1010# Change this if you are using your own github repository
1111gitSource=" https://github.com/Azure-Samples/azure-sql-db-python-rest-api.git"
1212
13+ # Make sure connection string variable is set
14+
15+ if [[ -z " ${SQLAZURECONNSTR_WWIF:- } " ]]; then
16+ echo " Plase export Azure SQL connection string:" ;
17+ echo " export SQLAZURECONNSTR_WWIF=\" your-connection-string-here\" " ;
18+ exit 1;
19+ fi
20+
21+ echo " Creating Resource Group..." ;
1322az group create \
1423 -n $resourceGroup \
1524 -l $location
1625
26+ echo " Creating Application Service Plan..." ;
1727az appservice plan create \
1828 -g $resourceGroup \
1929 -n " linux-plan" \
2030 --sku B1 \
2131 --is-linux
2232
33+ echo " Creating Web Application..." ;
2334az webapp create \
2435 -g $resourceGroup \
2536 -n $appName \
@@ -28,8 +39,9 @@ az webapp create \
2839 --deployment-source-url $gitSource \
2940 --deployment-source-branch master
3041
42+ echo " Configuring Connection String..." ;
3143az webapp config connection-string set \
3244 -g $resourceGroup \
3345 -n $appName \
34- --settings WWIF=$SQLAZURECONNSTR_WWIF \
46+ --settings WWIF=" $SQLAZURECONNSTR_WWIF " \
3547 --connection-string-type=SQLAzure
You can’t perform that action at this time.
0 commit comments