-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[App Service] az webapp create: Update this and similar commands to use new Site-level outboundVnetRouting property
#32634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…_all_enabled Update webapp and functionapp commands to use the new Site-level outbound_vnet_routing property with OutboundVnetRouting(application_traffic=True) instead of the deprecated SiteConfig vnet_route_all_enabled property. Commands updated: - az webapp create - az functionapp create - az webapp vnet-integration add - az functionapp vnet-integration add
…erty The API no longer honors the SiteConfig vnetRouteAllEnabled property. Updated update_site_configs to handle vnet_route_all_enabled separately by updating the Site-level outbound_vnet_routing property instead.
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates webapp and functionapp commands to use the new Site-level outbound_vnet_routing property instead of the deprecated SiteConfig vnet_route_all_enabled property for API version 2024-11-01. The changes maintain backward compatibility by setting application_traffic=True to preserve existing user-facing behavior.
Changes:
- Migrated from
vnet_route_all_enabledon SiteConfig tooutbound_vnet_routingon the Site object - Updated
az webapp create,az functionapp create, and vnet-integration commands to use the new property - Modified
az webapp config set --vnet-route-all-enabledto update the Site-level property instead of SiteConfig
Comments suppressed due to low confidence (1)
src/azure-cli/azure/cli/command_modules/appservice/custom.py:3137
- The inspect-based reflection logic at line 3136-3137 will still attempt to set
vnet_route_all_enabledon theconfigsobject (SiteConfig) when it is not None, which could cause issues since this property is no longer valid on SiteConfig in the new API version. The parameter should be excluded from the reflection logic similar to how 'generic_configurations' is excluded. Consider addingarg != 'vnet_route_all_enabled'to the condition at line 3136.
if arg != 'generic_configurations' and values.get(arg, None):
setattr(configs, arg, values[arg] if arg not in bool_flags else values[arg] == 'true')
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…f vnetRouteAllEnabled
8af4199 to
09ee741
Compare
Related command
az webapp create
az webapp config set
az webapp vnet-integration add
az functionapp create
az functionapp vnet-integration add
Description
Update webapp and functionapp commands to use the new Site-level outboundVnetRouting property instead of the deprecated SiteConfig vnetRouteAllEnabled property for API version 2024-11-01.
The vnetRouteAllEnabled property on SiteConfig is no longer honored by the API. This PR migrates to the new OutboundVnetRouting model with application_traffic=True to maintain backward compatibility and the same user-facing behavior.
az webapp create - Use outbound_vnet_routing on Site object
az functionapp create - Use outbound_vnet_routing on Site object
az webapp vnet-integration add - Use outbound_vnet_routing on Site object
az functionapp vnet-integration add - Use outbound_vnet_routing on Site object
az webapp config set --vnet-route-all-enabled - Now updates Site-level outbound_vnet_routing property instead of SiteConfig
Testing Guide
Test webapp create with vnet integration
az webapp create -g -p -n --vnet --subnet
az webapp show -g -n --query "outboundVnetRouting"
Expected: applicationTraffic: true
Test webapp config set
az webapp config set -g -n --vnet-route-all-enabled false
az webapp show -g -n --query "outboundVnetRouting.applicationTraffic"
Expected: false
az webapp config set -g -n --vnet-route-all-enabled true
az webapp show -g -n --query "outboundVnetRouting.applicationTraffic"
Expected: true
History Notes
[App Service] Fix vnet routing to use Site-level outboundVnetRouting property for API version 2024-11-01
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.