Skip to content

[Logic App] az logicapp create: Add the --domain-name-scope support#32812

Open
jsharmaMSFT wants to merge 6 commits intoAzure:devfrom
SharmaJaiP:logicapp-domain-name-scope
Open

[Logic App] az logicapp create: Add the --domain-name-scope support#32812
jsharmaMSFT wants to merge 6 commits intoAzure:devfrom
SharmaJaiP:logicapp-domain-name-scope

Conversation

@jsharmaMSFT
Copy link
Member

Related command
az logicapp create

Description
The change adds the support of --domain-name-scope parameter. The parameter helps customers to specify the domain name scope for the logic app. For example, when creating the logic app with --domain-name-scope SubscriptionReuse, it will create functionapp with the domain of the format of [appname]-[unique-string].[region].azurewebsites.net instead of the default domain of [appnames].azurewebsites.net.

Testing Guide
az logicapp create -g [resrouce-group] --subscription [azure-subscription] -p [appservice-plan] -n [logicapp-name] -s [storage-account-name] --domain-name-scope SubscriptionReuse

History Notes


This checklist is used to make sure that common guidelines for a pull request are followed.

jsharmaMSFT and others added 5 commits February 18, 2026 15:21
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-client-tools-bot-prd
Copy link

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link

Hi @jsharmaMSFT,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 18, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for configuring the default hostname uniqueness scope when creating Logic Apps (az logicapp create), enabling “unique” hostnames (with a suffix) via --domain-name-scope.

Changes:

  • Adds --domain-name-scope argument to az logicapp create and wires it through to the underlying Site model (autoGeneratedDomainNameLabelScope).
  • Updates logicapp help with an example using the new flag.
  • Adds an E2E test + recording validating the generated defaultHostName format when --domain-name-scope SubscriptionReuse is used.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_logicapp_commands.py Adds an E2E scenario validating the unique-hostname format for logicapp create.
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_logicapp_unique_domain_name.yaml New test recording for the unique-domain-name scenario.
src/azure-cli/azure/cli/command_modules/appservice/logicapp/custom.py Plumbs auto_generated_domain_name_label_scope into the Site creation payload.
src/azure-cli/azure/cli/command_modules/appservice/logicapp/_help.py Adds CLI help example for --domain-name-scope.
src/azure-cli/azure/cli/command_modules/appservice/_params.py Registers --domain-name-scope for logicapp create.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

c.argument('runtime_version', help='The runtime version for logic app.', arg_type=get_enum_type(LOGICAPPS_NODE_RUNTIME_VERSIONS))
c.argument('functions_version', options_list=['--functions-version', '-v'],
help='The functions version for logic app.', arg_type=get_enum_type(FUNCTIONS_VERSIONS))
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'])
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For logicapp create, this argument is registered with a hard-coded choices=[...], but the module already imports AutoGeneratedDomainNameLabelScope (from azure.mgmt.web.models) and uses arg_type=get_enum_type(AutoGeneratedDomainNameLabelScope) for webapp create. Consider switching this to the enum-based arg_type as well to avoid duplicating allowed values and to keep behavior consistent with the other App Service commands (including any enum-driven parsing/validation improvements).

Suggested change
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'])
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.",
arg_type=get_enum_type(AutoGeneratedDomainNameLabelScope))

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

@vkarasala vkarasala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SharmaJaiP
Copy link

Hi @yonzhan could you please review this PR. It would be great to include it in March milestone, This change is required for GAing regionalized URLs for Logic Apps, an important step towards scaling out our DNS zones and remove SPOF.

@pvbchak
Copy link

pvbchak commented Feb 20, 2026

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Logic App az logic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

Comments