Closed Devvox93 closed 3 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI.
WebApp team, please help to look into this issue.
Assigning it to my self to repro
@ThejaChoudary Any update on this? Did you manage to repro it?
@Devvox93 sorry for the delay here - could you however answer a few questions here please:
This command does the following "The Get-AzWebAppSlotConfigName cmdlet retrieves the list of App Setting and Connection String names that are currently marked as slot settings" you see the following link that gives details https://docs.microsoft.com/en-us/powershell/module/Az.Websites/get-azwebappslotconfigname?view=azps-4.6.1
Can you please share what are you trying to achieve? Are you trying to get the full list of configuration settings on an App & a slot? For that you can use Get-AzWebApp & Get-AzWebAppSlot. Thank you!
What I'm trying to achieve is to get a list of app settings that are marked as slot settings for a specific slot. However, I can only get such a list for an app a.k.a. the production slot of the app. That is of not much use.
Any update on this? 2+ weeks since the last update.
@ThejaChoudary Are you still on this? Do you need more info to repro? I thought I was pretty specific.
@panchagnula I answered your questions, but got no further response.
I guess this isn't a priority. Sad that slots don't get that much attention. They're very useful, but support for it in tooling (this instance as well as deployment of app settings to slots in general) is quite poor.
I've done some further digging myself and this is the road it takes:
WebsiteClient uses the WebApps property to call the ListSlotConfigurationNames method, which doesn't have a slotName
parameter.
I'm not sure if the error "Input object is a deployment slot, not a production web app" originates from here or from the commandlet(s), but I'm guessing because the method above provides no way to pass a slot name, neither can the Get-AzWebAppSlotConfigName
commandlet.
I'm filing an issue at the Azure SDK for .NET, since support has to be added there in order for this commandlet to support the correct working.
@JasonFreeberg seems like this is byDesign for now - I am tagging you here so that we can see if the feature support here so that PS command can be updated as well.
Description
The Get-AzWebAppSlotConfigName commandlet requires either a PSSite (-WebApp) or 2 strings (-ResourceGroupName and -Name), where Name is the name of a web app. There is no way to provide -Slot or -SlotName and providing an app slot to the -WebApp parameter results in a "Input object is a deployment slot, not a production web app" error.
This commandlet is to get the slot config names, which is impossible for anything but the production slot. It annoys me a lot, since this is the commandlet to do this and I cannot find an alternative way to get this info through scripting either.
Can this commandlet be updated to do what it's for? And are there any workarounds/alternatives that I missed? (In the meantime, I use hardcoded values in my scripts, with pain in my developers heart.)
Steps to reproduce
Environment data
Below info is from the Azure Cloud Shell, which would be the most up-to-date environment I've tried. Other environments I've tried are locally with Powershell and on an agent with the Azure Powershell-task. In none of the environments I can get the slot config settings for the staging slot.
Module versions
Debug output
Not applicable. Commandlet is not supporting slots.
Error output