Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add warning messages
  • Loading branch information
kairu-ms committed Apr 25, 2025
commit ba634e8a8139aace55e7bc4c6b92be6dc00b8be1
13 changes: 12 additions & 1 deletion src/azure-cli-core/azure/cli/core/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,18 @@ def get_clouds(cli_ctx):
# If profile isn't set, use latest
setattr(c, 'profile', 'latest')
if c.profile not in API_PROFILES:
raise CLIError('Profile {} does not exist or is not supported.'.format(c.profile))
if c.profile in (
"2017-03-09-profile",
"2018-03-01-hybrid",
"2019-03-01-hybrid",
"2020-09-01-hybrid",
):
raise CLIError(
"The azure stack profile '{}' has been deprecated and removed, please use the 'latest' profile instead."
"To continue using Azure Stack please install the CLI 2.66.* (LTS) version.".format(c.profile)
)
else:
raise CLIError('Profile {} does not exist or is not supported.'.format(c.profile))
if not c.endpoints.has_endpoint_set('management') and \
c.endpoints.has_endpoint_set('resource_manager'):
# If management endpoint not set, use resource manager endpoint
Expand Down
Loading