Output Azure SQL Database ConnectionString after template deployment -


i have arm template (among others) creates database on azure sql server (which created template).

i need output database ado.net connectionstring.

becuase wasn't sure key called, outputting whole object: have on json template file: "databaseconnectionstring": { "type": "object", "value": "[listkeys(variables('dbresourceid'), variables('apiversion'))]" }

the dbresourceid 100% correct. if output instead, correct id , apiversion same use when creating db. but, error: "code": "notfound", "message": "resource not found segment 'listkeys'.",

the database being created correctly

i have exact same pattern/idea service bus , works help, killing me

well, looks connection string not property, why cannot returned listkeys, needs "calculated" using concat

"databaseconnectionstring": {   "type": "string",   "value": "[concat('server=tcp:',reference(variables('sqlservername')).fullyqualifieddomainname,',1433;initial catalog=',variables('dbname'),';persist security info=false;user id=',reference(variables('sqlservername')).administratorlogin,';password=',reference(variables('sqlservername')).administratorloginpassword,';multipleactiveresultsets=false;encrypt=true;trustservercertificate=false;connection timeout=30;')]" } 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -