azure-cli: webapp:Parameter --configuration-source does not copy app settings and connection strings
I expected the --configuration-source
parameter on az webapp deployment slot create
command to copy app settings and connection strings to the new slot, but it doesn’t.
Is there another way to achieve this using the CLI? Using the Azure Portal, it is possible to clone the configuration from another slot. It would be really useful if this functionality were also available from the CLI.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: ce9f5bf9-d178-de1a-645b-be6947a7c049
- Version Independent ID: cb7fb876-160c-e6d9-d473-7ac39b930b48
- Content: az webapp deployment slot
- Content Source: latest/docs-ref-autogen/webapp/deployment/slot.yml
- Service: app-service-web
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 6
- Comments: 37 (17 by maintainers)
@HerrNiklasRaab Not sure if this is a solution for you, but what we did in our pipelines is use the Az module for PowerShell. The PowerShell command
New-AzWebAppSlot
with the-SourceWebApp
parameter mimics the expected behavior of the Azure CLI command being discussed here and the behavior of the Azure Portal.So of the three management options, it appears the Azure CLI is the outlier.
This is really a blocker, what is the current plan? I just see this being moved to the next sprint over and over?
Just ran through this on the Portal and compared. I agree with @HerrNiklasRaab, let’s use the same implementation as the Portal (copy all settings).
I think the cli should replicate the behavior from the portal:
Is a setting marked as deployment slot setting, then it should:
This is the behavior I expected and was surprised to see that this was not the case.
I have narrowed it down a bit further. The difference between the portal and
--configuration-source
is that the portal also clones app settings or configuration strings that are configured as ‘slot settings’. The CLI tools apparently ignore slot settings.It would probably be helpful if
--configuration-source
worked exactly like the clone functionality in the portal.@rulrok you are not incorrect in expecting this behavior - it turns out our backend APIs that CLI uses don’t automatically copy the settings over - CLI needs to explicitly handle this. We need make the change.