Web/sites/config Connection strings issue #6946
-
Hi So I do have 2 Connection string for a webApp: And I wanted to inject them into WebApp I've tried the 'old' way for appSettings: or recommended in ms docs: resource appServiceApp 'Microsoft.Web/sites@2020-06-01' existing = { resource symbolicname 'Microsoft.Web/sites/config@2021-03-01' = { but it throws meaningless errors.. Can you please advise how to inject connection strings? Preferably I would like to inject array of connectonstring like: which seems to be most natural way of putting series of connection strings to webapp |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You can try below resource webSite 'Microsoft.Web/sites@2021-03-01' existing = {
name: 'acu1-brw-aoa-t5-be'
}
resource connectionstrings 'Microsoft.Web/sites/config@2021-03-01' = {
name: 'connectionstrings'
parent: webSite
properties: {
SQL01: {
value: 'teststringconnetionvalue2'
type: 'SQLServer'
}
}
} The specification is here: https://docs.microsoft.com/en-us/azure/templates/microsoft.web/sites/config-connectionstrings?tabs=bicep |
Beta Was this translation helpful? Give feedback.
-
when I try to add the configuration like this {
name: 'ConnectionStrings:DefaultConnection'
value: dbConnectionString
} it throws error
|
Beta Was this translation helpful? Give feedback.
You can try below
The specification is here: https://docs.microsoft.com/en-us/azure/templates/microsoft.web/sites/config-connectionstrings?tabs=bicep