I am using Azure App Service Settings task in a release pipeline for a web app. I need to set the connection string.
According to the help icon it expects JSON syntax
{
"name": "key1",
"value": "valueabcd",
"type": "MySql",
"slotSetting": false
}
I would like pull the "value" from either a Variable Group that I have linked to Azure Key Vault, or from KeyVault or even just a pipeline variable. I just want it to be secure.
The problem I am running into is how to pass a variable into the JSON if its a secret. If I do something like this
{
"name": "ConnectionStringName",
"value": "$(DBConnectionString)",
"type": "SQLAzure",
"slotSetting": false
}
Then the connection string is literally $(DBConnectionString). You cant remove the quotes because then its not proper JSON. It it related to the fact that its a secret because it works fine with regular variables. I have read a few articles about how secrets are used differntly, but have not been able to apply them what I am doing.
I am including a screenshot to help explain where I am seeing this.





