Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def load_arguments(self, _):
c.argument('vnet', help="Name or resource ID of the regional virtual network. If there are multiple vnets of the same name across different resource groups, use vnet resource id to specify which vnet to use. If vnet name is used, by default, the vnet in the same resource group as the webapp will be used. Must be used with --subnet argument.")
c.argument('subnet', help="Name or resource ID of the pre-existing subnet to have the webapp join. The --vnet is argument also needed if specifying subnet by name.")
c.argument('public_network_access', help="Enable or disable public access to the web app", arg_type=get_enum_type(PUBLIC_NETWORK_ACCESS_MODES))
c.argument('acr_use_identity', action='store_true', help="Enable or disable pull image from acr use managed identity")
c.ignore('language')
c.ignore('using_webapp_up')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi
deployment_local_git=None, docker_registry_server_password=None, docker_registry_server_user=None,
multicontainer_config_type=None, multicontainer_config_file=None, tags=None,
using_webapp_up=False, language=None, assign_identities=None,
role='Contributor', scope=None, vnet=None, subnet=None, https_only=False, public_network_access=None):
role='Contributor', scope=None, vnet=None, subnet=None, https_only=False, public_network_access=None,
acr_use_identity=False):
from azure.mgmt.web.models import Site
from azure.core.exceptions import ResourceNotFoundError as _ResourceNotFoundError
SiteConfig, SkuDescription, NameValuePair = cmd.get_models(
Expand Down Expand Up @@ -188,6 +189,9 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi
if using_webapp_up:
https_only = using_webapp_up

if acr_use_identity:
site_config.acr_use_managed_identity_creds = acr_use_identity

webapp_def = Site(location=location, site_config=site_config, server_farm_id=plan_info.id, tags=tags,
https_only=https_only, virtual_network_subnet_id=subnet_resource_id,
public_network_access=public_network_access, vnet_route_all_enabled=vnet_route_all_enabled)
Expand Down
Loading