Reputation: 141442
We have setup an Azure Web App using a deployment template. Now from the command line we could like to check some configuration settings. How do we show the current connection string? We have tried this:
azure webapp show <resource-group> <site-name>
This only gives us a few details not including the connection string.
Web app Name
SKU
Enabled
Last Modified
Location
Host Name
We have also tried looking in resources.azure.com and we DO see the connection string listed there. We just do not know how to access it via the Azure CLI.
Upvotes: 3
Views: 366
Reputation: 37520
You can list connection strings if you switch over from ARM to ASM mode and use azure site connectionstring list
...
$ azure config set mode asm
info: Executing command config set
info: Setting "mode" to value "asm"
info: Changes saved
info: config set command OK
$ azure site connectionstring list <webAppName> --json
[
{
"connectionString": "my super secret connection string!",
"name": "DefaultConnection",
"type": 2
}
]
Upvotes: 2
Reputation: 5262
At the moment you can't. Best you have is some additional info using -vv option.
azure webapp show [resource-group] [name] -vv
ConnectionString will not be there and even tho appSettings shows up in the resulting json, it will always be null no matter the values you put in.
"siteProperties":{
"metadata":null,
"properties":[],
"appSettings":null
}
Upvotes: 2