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 3
3
set -euo pipefail
4
4
5
5
# 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 "
8
8
location=" WestUS2"
9
9
10
10
# Change this if you are using your own github repository
11
11
gitSource=" https://github.com/Azure-Samples/azure-sql-db-python-rest-api.git"
12
12
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..." ;
13
22
az group create \
14
23
-n $resourceGroup \
15
24
-l $location
16
25
26
+ echo " Creating Application Service Plan..." ;
17
27
az appservice plan create \
18
28
-g $resourceGroup \
19
29
-n " linux-plan" \
20
30
--sku B1 \
21
31
--is-linux
22
32
33
+ echo " Creating Web Application..." ;
23
34
az webapp create \
24
35
-g $resourceGroup \
25
36
-n $appName \
@@ -28,8 +39,9 @@ az webapp create \
28
39
--deployment-source-url $gitSource \
29
40
--deployment-source-branch master
30
41
42
+ echo " Configuring Connection String..." ;
31
43
az webapp config connection-string set \
32
44
-g $resourceGroup \
33
45
-n $appName \
34
- --settings WWIF=$SQLAZURECONNSTR_WWIF \
46
+ --settings WWIF=" $SQLAZURECONNSTR_WWIF " \
35
47
--connection-string-type=SQLAzure
You can’t perform that action at this time.
0 commit comments