On my App Service i have several KeyVaults pinting to diferents URL’s.
I create a layer on App Configuration that depending if the Label point to Dev-DB, QA-DB, o Stage-DB Change the database of the App Service.
All my app services have on Environment variables, inside Connection strings all the diferent databases.
Inside of the Value i have this:
"@Microsoft.KeyVault(SecretUri=https://{MyKeyvault}.vault.azure.net/secrets/{MyVariable}/)+"Application Name={UserOfDB};"",
And i want to use somthing like this:
"@Microsoft.AppConfiguration(https://{MyAppConfig}.azconfig.net;Id={IdConfig};Secret={MySecret};Key={MyVariable};Label=${MyEnviromentVariable}) + "Application Name={UserOfDB};"",
But it gave me this error:
Identity: System assigned managed identity Status: InvalidSyntax Error details: Reference was not able to be resolved because invalid reference syntax found.
I just need a way to easy switch between Databases without losing my mind in the process.
Alejandro Barrios is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.