[Logic App] az logicapp create: Add the --domain-name-scope support#32812
[Logic App] az logicapp create: Add the --domain-name-scope support#32812jsharmaMSFT wants to merge 6 commits intoAzure:devfrom
Conversation
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>
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Hi @jsharmaMSFT, |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
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-scopeargument toaz logicapp createand wires it through to the underlyingSitemodel (autoGeneratedDomainNameLabelScope). - Updates logicapp help with an example using the new flag.
- Adds an E2E test + recording validating the generated
defaultHostNameformat when--domain-name-scope SubscriptionReuseis 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']) |
There was a problem hiding this comment.
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).
| 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)) |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
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. |
|
LGTM |
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.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.