You are developing an Azure App Service web app named webapp-prod that has a deployment slot named staging. The application uses an app setting named DbConnection to store its database connection string. You need to configure the application so that the DbConnection setting remains slot-specific and does not change slots during a swap operation. Which Azure CLI command should you run?
- az webapp config slot-settings set --name webapp-prod --resource-group rg-prod --app-settings DbConnectionCevap
- Baz webapp config appsettings set --name webapp-prod --resource-group rg-prod --settings DbConnection --slot-settings DbConnection
- Caz webapp deployment slot update --name webapp-prod --resource-group rg-prod --slot staging --settings DbConnection
- Daz webapp config slot-settings set --name webapp-prod --resource-group rg-prod --connection-strings DbConnection
Cevap
The command 'az webapp config slot-settings set --name webapp-prod --resource-group rg-prod --app-settings DbConnection' is correct.
The correct command uses the 'az webapp config slot-settings set' command with the '--app-settings' parameter to specify that the 'DbConnection' setting should remain sticky to the slot and not be swapped.
Adım Adım Çözüm
Anahtar Kavram
Azure App Service deployment slot settings stickiness configuration