Skip to content

Commit 6d4bb8a

Browse files
fix variable name typo and update SQL connection string to use Azure Key Vault
1 parent 961e6ad commit 6d4bb8a

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

  • samples/web-app-sql-database/python/scripts

samples/web-app-sql-database/python/scripts/deploy.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUNTIME="python"
2222
RUNTIME_VERSION="3.13"
2323
DEPLOY_APP=1
2424
ENVIRONMENT=$(az account show --query environmentName --output tsv)
25-
KEYVAULT_NAME="${PREFIX}-kv-${SUFFIX}"
25+
KEY_VAULT_NAME="${PREFIX}-kv-${SUFFIX}"
2626
SECRET_NAME="SqlConnectionString"
2727

2828
# Change the current directory to the script's directory
@@ -330,8 +330,6 @@ $AZ keyvault create \
330330
--name "$KEY_VAULT_NAME" \
331331
--resource-group "$RESOURCE_GROUP_NAME" \
332332
--location "$LOCATION" \
333-
--enable-soft-delete true \
334-
--retention-days 7 \
335333
--only-show-errors 1>/dev/null
336334

337335
if [ $? -eq 0 ]; then
@@ -391,10 +389,7 @@ $AZ webapp config appsettings set \
391389
--settings \
392390
SCM_DO_BUILD_DURING_DEPLOYMENT='true' \
393391
ENABLE_ORYX_BUILD='true' \
394-
SQL_SERVER="$SQL_SERVER_FQDN" \
395-
SQL_DATABASE="$SQL_DATABASE_NAME" \
396-
SQL_USERNAME="$DATABASE_USER_NAME" \
397-
SQL_PASSWORD="$DATABASE_USER_PASSWORD" \
392+
SQL_CONNECTION_STRING="@Microsoft.KeyVault(SecretUri=${SECRET_URI})" \
398393
LOGIN_NAME="$LOGIN_NAME" \
399394
--only-show-errors 1>/dev/null
400395

0 commit comments

Comments
 (0)