Skip to content

Commit 40d6a02

Browse files
committed
added unique domain feature in functionapp create
1 parent f7c9331 commit 40d6a02

File tree

4 files changed

+1720
-3
lines changed

4 files changed

+1720
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,7 @@ def load_arguments(self, _):
890890
help='Enable zone redundancy for high availability. Applies to Flex Consumption SKU only.', is_preview=True)
891891
c.argument('configure_networking_later', options_list=['--configure-networking-later', '--cnl'], arg_type=get_three_state_flag(),
892892
help='Use this option if you want to configure networking later for an app using network-restricted storage.')
893+
c.argument('auto_generated_domain_name_label_scope', options_list=['--domain-name-scope'], help="Specify the scope of uniqueness for the default hostname during resource creation. ", choices=['TenantReuse', 'SubscriptionReuse', 'ResourceGroupReuse', 'NoReuse'])
893894

894895
with self.argument_context('functionapp deployment config set') as c:
895896
c.argument('deployment_storage_name', options_list=['--deployment-storage-name', '--dsn'], help="The deployment storage account name.", is_preview=True)

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6092,7 +6092,8 @@ def create_functionapp(cmd, resource_group_name, name, storage_account, plan=Non
60926092
always_ready_instances=None, maximum_instance_count=None, instance_memory=None,
60936093
flexconsumption_location=None, deployment_storage_name=None,
60946094
deployment_storage_container_name=None, deployment_storage_auth_type=None,
6095-
deployment_storage_auth_value=None, zone_redundant=False, configure_networking_later=None):
6095+
deployment_storage_auth_value=None, zone_redundant=False, configure_networking_later=None,
6096+
auto_generated_domain_name_label_scope=None):
60966097
# pylint: disable=too-many-statements, too-many-branches
60976098

60986099
if functions_version is None and flexconsumption_location is None:
@@ -6184,7 +6185,8 @@ def create_functionapp(cmd, resource_group_name, name, storage_account, plan=Non
61846185

61856186
disable_app_insights = disable_app_insights == "true"
61866187

6187-
site_config = SiteConfig(app_settings=[])
6188+
settings = []
6189+
site_config = SiteConfig(app_settings=settings)
61886190
client = web_client_factory(cmd.cli_ctx)
61896191

61906192
if vnet or subnet:
@@ -6224,7 +6226,8 @@ def create_functionapp(cmd, resource_group_name, name, storage_account, plan=Non
62246226
site_config.http20_proxy_flag = None
62256227

62266228
functionapp_def = Site(location=None, site_config=site_config, tags=tags,
6227-
virtual_network_subnet_id=subnet_resource_id, https_only=https_only)
6229+
virtual_network_subnet_id=subnet_resource_id, https_only=https_only,
6230+
auto_generated_domain_name_label_scope=auto_generated_domain_name_label_scope)
62286231

62296232
plan_info = None
62306233
if runtime is not None:

0 commit comments

Comments
 (0)