Skip to content

Commit b121156

Browse files
committed
App Service clone from prod - Fix #26920
1 parent 8616453 commit b121156

File tree

3 files changed

+3668
-0
lines changed

3 files changed

+3668
-0
lines changed

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

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

2506+
# Do not clone site config when cloning from production
2507+
if configuration_source and configuration_source.lower() == webapp.lower():
2508+
slot_def.site_config = None
2509+
2510+
# Match cloned site settings from Azure portal
2511+
slot_def.https_only = site.https_only
2512+
slot_def.client_cert_enabled = site.client_cert_enabled
2513+
slot_def.client_cert_mode = site.client_cert_mode
2514+
slot_def.client_cert_exclusion_paths = site.client_cert_exclusion_paths
2515+
slot_def.public_network_access = site.public_network_access
2516+
25062517
# if it is a Windows Container site, at least pass the necessary
25072518
# app settings to perform the container image validation:
25082519
if configuration_source and site_config.windows_fx_version:

0 commit comments

Comments
 (0)