Skip to content
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

az containerapp up: Fix InvalidResourceType error when cloud is not AzureCloud #7551

Merged
merged 10 commits into from
Apr 28, 2024
Prev Previous commit
Next Next commit
add default cloud to AzureCloud when not login
  • Loading branch information
Greedygre authored and Greedygre committed Apr 25, 2024
commit c19929b69e6449f55ce229f02ed5decd1498c9ed
5 changes: 4 additions & 1 deletion src/containerapp/azext_containerapp/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,10 @@ def get_subscription_cloud_name(cli_ctx):

def is_cloud_supported_by_connected_env(cli_ctx):
from azure.cli.core.cloud import CloudNameEnum
cloud_name = get_subscription_cloud_name(cli_ctx)
try:
cloud_name = get_subscription_cloud_name(cli_ctx)
except CLIError:
return True
if cloud_name == CloudNameEnum.AzureChinaCloud or cloud_name == CloudNameEnum.AzureUSGovernment:
Greedygre marked this conversation as resolved.
Show resolved Hide resolved
return False

Expand Down
Loading