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')]" + } + } }