webapp:Unable to set WebApp Slot logging using az webapp log config --ids [webapp slot id]
See original GitHub issue
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
The command “az webapp log config” when used with the parameter “–ids [appServiceSlotID]” configure the main AppService instead of the specified AppService Slot.
To Reproduce
- Create a Resource Group, say “resourceGroupName”.
- Create an AppService in the newly created Resource Group, say “appServiceName”.
- Add an AppService Slot to the newly created AppService, say “appServiceSlotName”.
- Run the following command:
az webapp log config \
--docker-container-logging "filesystem" \
--ids "/subscriptions/[subscriptionID]/resourceGroups/[resourceGroupName]/providers/Microsoft.Web/sites/[appServiceName]/slots/[appServiceSlotName]"
Expected behavior
The specified AppService Slot/AppService Logs is enabled with the following default parameters:
- Application Logging: filesystem
- Quota (MB): 100
- Retention Period (Days): 3
Observed behavior
The AppService/AppService Logs is enabled with the following default parameters:
- Application Logging: filesystem
- Quota (MB): 100
- Retention Period (Days): 3
Environment summary
Install Method: apt CLI version: 2.27. OS version : Ubuntu 20.04.2 LTS Shell Type: bash
Additional context
The following equivalent command works as expected:
az webapp log config \
--docker-container-logging "filesystem" \
--resouce-group [resourceGroupName] \
--name [appServiceName] \
--slot [appServiceSlotName]
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
az webapp log - Microsoft Learn
Default to the productions slot if not specified. --subscription. Name or ID of subscription. You can configure the default subscription using az account...
Read more >Azure Web Apps deployment tutorial - Harness.io Docs
Harness can deploy a Docker image or non-containerized artifact for your Azure Web App. You can deploy to slots, perform traffic shifting, and...
Read more >Change Exisitng Web App to use a New Custom Domain
Host the new custom domain web app in a new slot (suppose: Production Slot) Using ... az webapp config hostname add [--hostname] [--ids] ......
Read more >azurerm_app_service_slot | Resources | hashicorp/azurerm
When using Slots - the app_settings , connection_string and site_config ... The ID of the App Service Plan within which to create this...
Read more >azure.azcollection.azure_rm_webappslot module – Manage ...
Configure web app slot application settings. Suboptions are in key value pair format. app_state. string. Start/Stop/Restart the slot. Choices:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@PatrickMessierGoC Agree with your suggestion. But this is not the problem with only
webapp
this is the same behavior with all the otherazure resources
too. So we will take it into CLI core team to handle this at root level instead of individual module level.As mentionned on Sept 10th, I now understand that. My point is that - based on the command documentation on the [–ids] parameter - “It should be a complete resource ID containing all information of ‘Resource Id’ arguments. You should provide either --ids or other ‘Resource Id’ arguments.” make me (and probably some other people) believe that we can either provide a full resource ID (an App Service Slot has a Resource ID) or the other resource Id arguments which are namely the [–subscription], the [–resource-group], the App Service [–name], and the [–slot] name. In other words, we should not mix [–Ids] and [–slot] parameters.
A meaningfull warning or error message would have been appreciated. That’s all.