Skip to content

Commit 9b32f8e

Browse files
authored
[App Service] Fix #26920: az webapp deployment slot create: Make the command consistent with the portal behavior (#30836)
1 parent 40e2c1e commit 9b32f8e

3 files changed

Lines changed: 3668 additions & 0 deletions

File tree

src/azure-cli/azure/cli/command_modules/appservice/custom.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,6 +2869,17 @@ def create_webapp_slot(cmd, resource_group_name, webapp, slot, configuration_sou
28692869
slot_def = Site(server_farm_id=site.server_farm_id, location=location)
28702870
slot_def.site_config = SiteConfig()
28712871

2872+
# Do not clone site config when cloning from production
2873+
if configuration_source and configuration_source.lower() == webapp.lower():
2874+
slot_def.site_config = None
2875+
2876+
# Match cloned site settings from Azure portal
2877+
slot_def.https_only = site.https_only
2878+
slot_def.client_cert_enabled = site.client_cert_enabled
2879+
slot_def.client_cert_mode = site.client_cert_mode
2880+
slot_def.client_cert_exclusion_paths = site.client_cert_exclusion_paths
2881+
slot_def.public_network_access = site.public_network_access
2882+
28722883
# if it is a Windows Container site, at least pass the necessary
28732884
# app settings to perform the container image validation:
28742885
if configuration_source and site_config.windows_fx_version:

0 commit comments

Comments
 (0)