-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[App Service] az functionapp/logicapp create
: Add new --https-only
parameter
#23213
Changes from 13 commits
a44b7a7
b93efd7
e22bed8
edb9dac
3f2d96d
230fbba
ef73111
ae66a01
e3df608
a400b0f
fe2366c
0ba0123
8b219d7
1c1a551
6c4129e
a6e5472
95d0b3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -336,7 +336,7 @@ def validate_vnet_integration(cmd, namespace): | |
resource_group_name=namespace.resource_group_name) | ||
|
||
sku_name = plan_info.sku.name | ||
disallowed_skus = {'FREE', 'SHARED', 'BASIC', 'ElasticPremium', 'PremiumContainer', 'Isolated', 'IsolatedV2'} | ||
disallowed_skus = {'FREE', 'SHARED', 'PremiumContainer', 'Isolated', 'IsolatedV2'} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we confirm with function apps team this list accurate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We confirmed this on the original email thread with the functions team that prompted this change |
||
if get_sku_tier(sku_name) in disallowed_skus: | ||
raise ArgumentUsageError("App Service Plan has invalid sku for vnet integration: {}." | ||
"Plan sku cannot be one of: {}. " | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -2670,7 +2670,8 @@ def delete_ssl_cert(cmd, resource_group_name, certificate_thumbprint): | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def import_ssl_cert(cmd, resource_group_name, name, key_vault, key_vault_certificate_name): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Certificate = cmd.get_models('Certificate') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
client = web_client_factory(cmd.cli_ctx) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# TODO remove api_version when Microsoft.CertificateRegistration supports a later version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
client = web_client_factory(cmd.cli_ctx, api_version="2021-01-15") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @StrawnSC May I ask why azure-cli/src/azure-cli-core/azure/cli/core/profiles/_shared.py Lines 151 to 164 in b475906
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The App Service certs and domains back end team just released the new API version, so I just removed all the places where I was hardcoding the API version in the client There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@zhoxing-ms this was a temporary change, while we were waiting on ARM manifest update for the new API version to complete across all locations & get the initial code review unblocked. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
webapp = client.web_apps.get(resource_group_name, name) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if not webapp: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
raise ResourceNotFoundError("'{}' app doesn't exist in resource group {}".format(name, resource_group_name)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -2709,8 +2710,10 @@ def import_ssl_cert(cmd, resource_group_name, name, key_vault, key_vault_certifi | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_id = get_subscription_id(cmd.cli_ctx) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if cloud_type.lower() == PUBLIC_CLOUD.lower(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if kv_subscription.lower() != subscription_id.lower(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# TODO remove api_version when Microsoft.CertificateRegistration supports a later version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
diff_subscription_client = get_mgmt_service_client(cmd.cli_ctx, ResourceType.MGMT_APPSERVICE, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_id=kv_subscription) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_id=kv_subscription, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
api_version="2021-01-15") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ascs = diff_subscription_client.app_service_certificate_orders.list() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ascs = client.app_service_certificate_orders.list() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -3415,7 +3418,7 @@ def create_functionapp(cmd, resource_group_name, name, storage_account, plan=Non | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deployment_source_branch='master', deployment_local_git=None, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker_registry_server_password=None, docker_registry_server_user=None, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deployment_container_image_name=None, tags=None, assign_identities=None, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
role='Contributor', scope=None, vnet=None, subnet=None): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
role='Contributor', scope=None, vnet=None, subnet=None, https_only=False): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# pylint: disable=too-many-statements, too-many-branches | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if functions_version is None: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
logger.warning("No functions version specified so defaulting to 3. In the future, specifying a version will " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -3462,7 +3465,7 @@ def create_functionapp(cmd, resource_group_name, name, storage_account, plan=Non | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subnet_resource_id = None | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
functionapp_def = Site(location=None, site_config=site_config, tags=tags, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
virtual_network_subnet_id=subnet_resource_id) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
virtual_network_subnet_id=subnet_resource_id, https_only=https_only) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan_info = None | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if runtime is not None: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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.
should the return_label be TRUE here - since this change will impact webapp up where we default this to True?
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.
I've tested this and
return_label=True
causes broken behavior when the user calls this as--https-only false
. Havingreturn_label=True
results in the value being passed as a string (ie"true"
or"false"
) instead of a boolean value (True
orFalse
). This behavior is explained in the documentation in the screenshot below. The result is that if we hadreturn_label=True
and the user called the command with--https-only false
, they would have a webapp with httpsOnly true.I just doubled check this and it doesn't impact webapps created with
az webapp up
-- they still are httpsOnly by default:Documentation for the return_label argument: