From 0811482d3968f6f0283964bf357b3ed8c0177ced Mon Sep 17 00:00:00 2001 From: Shawn Cicoria Date: Fri, 17 May 2019 12:15:29 -0400 Subject: [PATCH] Break down connection string for easy reading --- azuredeploy.json | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/azuredeploy.json b/azuredeploy.json index 17d8ace7..a1070982 100644 --- a/azuredeploy.json +++ b/azuredeploy.json @@ -97,9 +97,12 @@ "databaseSkuTier": "GeneralPurpose", "databaseSkuFamily": "Gen5", "databaseSkuName": "[concat('GP_', variables('databaseSkuFamily'), '_', parameters('databaseCores'))]", - "databaseConnectionString": "[concat('pgsql://', parameters('adminUserName'), '%40', variables('databaseServerName'), ':', parameters('adminPassword'), '@', variables('databaseServerName'), '.postgres.database.azure.com:5432/', parameters('databaseName'))]", "databaseVersion": "9.6", + "databaseServerPort": 5432, "databaseServerName": "[concat(parameters('appName'),'-state')]", + "databaseUserCredentials" : "[concat(uriComponent(concat(parameters('adminUserName'), '@', variables('databaseServerName'))), ':', parameters('adminPassword'))]", + "databaseFqdn" : "[concat( variables('databaseServerName'), '.postgres.database.azure.com:', variables('databaseServerPort'))]", + "databaseConnectionString": "[concat('pgsql://', variables('databaseUserCredentials'), '@', variables('databaseFqdn'), '/', parameters('databaseName'))]", "setupScriptName": "[concat(parameters('appName'),'-setup')]", "appServicePlanName": "[concat(parameters('appName'),'-hosting')]", "analyticsName": "[concat(parameters('appName'),'-analytics')]" @@ -269,5 +272,11 @@ "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]" } } - ] + ], + "outputs": { + "databaseServer": { + "type": "string", + "value": "[variables('databaseFqdn')]" + } + } }