diff --git a/samples/url-shortener/python/bicep/deploy.sh b/samples/url-shortener/python/bicep/deploy.sh index a3ae3a6..ba2530c 100755 --- a/samples/url-shortener/python/bicep/deploy.sh +++ b/samples/url-shortener/python/bicep/deploy.sh @@ -76,6 +76,9 @@ else exit 1 fi +# Newer Azure CLI versions may print a Bicep notice on stdout; keep only the JSON outputs +DEPLOYMENT_OUTPUTS=$(echo "$DEPLOYMENT_OUTPUTS" | sed -n '/^{/,$p') + WEB_APP_NAME=$(echo "$DEPLOYMENT_OUTPUTS" | jq -r .webAppName.value) FUNCTION_APP_NAME=$(echo "$DEPLOYMENT_OUTPUTS" | jq -r .functionAppName.value) WEB_APP_HOSTNAME=$(echo "$DEPLOYMENT_OUTPUTS" | jq -r .webAppHostName.value) diff --git a/samples/url-shortener/python/scripts/deploy.sh b/samples/url-shortener/python/scripts/deploy.sh index 2655b31..bfd5a3b 100755 --- a/samples/url-shortener/python/scripts/deploy.sh +++ b/samples/url-shortener/python/scripts/deploy.sh @@ -301,7 +301,7 @@ echo "Creating [$POSTGRES_DB_NAME] database on the [$POSTGRES_SERVER_NAME] Postg az postgres flexible-server db create \ --server-name $POSTGRES_SERVER_NAME \ --resource-group $RESOURCE_GROUP_NAME \ - --name $POSTGRES_DB_NAME 1>/dev/null + --database-name $POSTGRES_DB_NAME 1>/dev/null if [[ $? == 0 ]]; then echo "[$POSTGRES_DB_NAME] database successfully created on the [$POSTGRES_SERVER_NAME] PostgreSQL flexible server"