diff --git a/src/azure-cli/azure/cli/command_modules/rdbms/_params.py b/src/azure-cli/azure/cli/command_modules/rdbms/_params.py index fc386940e8e..21639a10620 100644 --- a/src/azure-cli/azure/cli/command_modules/rdbms/_params.py +++ b/src/azure-cli/azure/cli/command_modules/rdbms/_params.py @@ -459,7 +459,7 @@ def _flexible_server_params(command_group): ) pg_version_upgrade_arg_type = CLIArgumentType( - arg_type=get_enum_type(['12', '13', '14', '15', '16', '17']), + arg_type=get_enum_type(['13', '14', '15', '16', '17']), options_list=['--version', '-v'], help='Server major version.' ) diff --git a/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py b/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py index 93dbe5052cb..f9c68ce5688 100644 --- a/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py +++ b/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py @@ -299,11 +299,6 @@ def flexible_server_version_upgrade(cmd, client, resource_group_name, server_nam current_version = int(instance.version.split('.')[0]) if current_version >= int(version): raise CLIError("The version to upgrade to must be greater than the current version.") - if version == '12': - logger.warning("Support for PostgreSQL 12 has officially ended. As a result, " - "the option to select version 12 will be removed in the near future. " - "We recommend selecting PostgreSQL 13 or a later version for " - "all future operations.") list_server_capability_info = get_postgres_server_capability_info(cmd, resource_group_name, server_name) eligible_versions = list_server_capability_info['supported_server_versions'][str(current_version)] diff --git a/src/azure-cli/azure/cli/command_modules/rdbms/validators.py b/src/azure-cli/azure/cli/command_modules/rdbms/validators.py index efee756a851..ca6d2f49b02 100644 --- a/src/azure-cli/azure/cli/command_modules/rdbms/validators.py +++ b/src/azure-cli/azure/cli/command_modules/rdbms/validators.py @@ -515,8 +515,7 @@ def _pg_version_validator(version, versions, is_create): if version not in versions: raise CLIError('Incorrect value for --version. Allowed values : {}'.format(sorted(versions))) if version == '12': - logger.warning("Support for PostgreSQL 12 has officially ended. As a result, " - "the option to select version 12 will be removed in the near future. " + raise CLIError("Support for PostgreSQL 12 has officially ended. " "We recommend selecting PostgreSQL 13 or a later version for " "all future operations.")