Skip to content

Commit 6c1968d

Browse files
authored
[Storage] az storage account create/update: Add breaking change warning for --min-tls-version values tls1_0 and tls1_1 (#32652)
1 parent 2816ba0 commit 6c1968d

File tree

6 files changed

+201
-808
lines changed

6 files changed

+201
-808
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
6+
from azure.cli.core.breaking_change import register_other_breaking_change
7+
8+
# --min-tls-version removing version 1.0 1.1
9+
register_other_breaking_change('storage account create',
10+
message='The --min-tls-version argument values TLS1_0 and TLS1_1 have been retired on'
11+
' 2026/02/03 and will be removed on 2026/03/03.')
12+
register_other_breaking_change('storage account update',
13+
message='The --min-tls-version argument values TLS1_0 and TLS1_1 have been retired on'
14+
' 2026/02/03 and will be removed on 2026/03/03.')

src/azure-cli/azure/cli/command_modules/storage/_params.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,8 @@ def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statem
390390
'public access setting for a container is required to enable anonymous access.')
391391
c.argument('min_tls_version', arg_type=get_enum_type(t_tls_version),
392392
help='The minimum TLS version to be permitted on requests to storage. '
393-
'While the default setting is TLS 1.0 for this property, '
394-
'Microsoft recommends setting MinimumTlsVersion to 1.2 or above.')
393+
' Values TLS1_0 and TLS1_1 have been retired on 2026/02/03 and will be removed on 2026/03/03.'
394+
' Microsoft recommends setting MinimumTlsVersion to TLS1_2')
395395
c.argument('allow_shared_key_access', allow_shared_key_access_type)
396396
c.argument('edge_zone', edge_zone_type)
397397
c.argument('identity_type', arg_type=get_enum_type(t_identity_type), arg_group='Identity',
@@ -509,8 +509,8 @@ def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statem
509509
'public access setting for a container is required to enable anonymous access.')
510510
c.argument('min_tls_version', arg_type=get_enum_type(t_tls_version),
511511
help='The minimum TLS version to be permitted on requests to storage. '
512-
'While the default setting is TLS 1.0 for this property, '
513-
'Microsoft recommends setting MinimumTlsVersion to 1.2 or above.')
512+
' Values TLS1_0 and TLS1_1 have been retired on 2026/02/03 and will be removed on 2026/03/03.'
513+
' Microsoft recommends setting MinimumTlsVersion to TLS1_2')
514514
c.argument('allow_shared_key_access', allow_shared_key_access_type)
515515
c.argument('identity_type', arg_type=get_enum_type(t_identity_type), arg_group='Identity',
516516
help='The identity type.')

src/azure-cli/azure/cli/command_modules/storage/operations/account.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ def create_storage_account(cmd, resource_group_name, account_name, sku=None, loc
261261
params.encryption.require_infrastructure_encryption = require_infrastructure_encryption
262262

263263
if min_tls_version:
264+
if min_tls_version in ['TLS1_0', 'TLS1_1']:
265+
logger.warning('TLS 1.0 and TLS 1.1 have been retired on 2026/02/03, will use TLS 1.2 instead.')
266+
min_tls_version = 'TLS1_2'
264267
params.minimum_tls_version = min_tls_version
265268

266269
if allow_shared_key_access is not None:
@@ -680,7 +683,11 @@ def update_storage_account(cmd, instance, sku=None, tags=None, custom_domain=Non
680683

681684
if allow_blob_public_access is not None:
682685
params.allow_blob_public_access = allow_blob_public_access
686+
683687
if min_tls_version:
688+
if min_tls_version in ['TLS1_0', 'TLS1_1']:
689+
logger.warning('TLS 1.0 and TLS 1.1 have been retired on 2026/02/03, will use TLS 1.2 instead.')
690+
min_tls_version = 'TLS1_2'
684691
params.minimum_tls_version = min_tls_version
685692

686693
if allow_shared_key_access is not None:

0 commit comments

Comments
 (0)