|
4 | 4 | from threading import RLock
|
5 | 5 | from uuid import uuid4
|
6 | 6 |
|
7 |
| -from azure.identity import DefaultAzureCredential |
| 7 | +from azure.identity import AzureCliCredential |
8 | 8 | from azure.mgmt.compute import ComputeManagementClient
|
9 | 9 | from azure.mgmt.network import NetworkManagementClient
|
10 | 10 | from azure.mgmt.resource import ResourceManagementClient
|
@@ -65,12 +65,8 @@ def __init__(self, provider_config, cluster_name):
|
65 | 65 | _configure_resource_group({"provider": provider_config})
|
66 | 66 | subscription_id = provider_config["subscription_id"]
|
67 | 67 | self.cache_stopped_nodes = provider_config.get("cache_stopped_nodes", True)
|
68 |
| - # AWS provides managed identity for Azure, but it is not setup properly by |
69 |
| - # default. This interferes with azure-cli credentials and causes failures, |
70 |
| - # when using sky to launch Azure on AWS ec2 instances. We disable it to give |
71 |
| - # way to azure-cli credentials. |
72 |
| - credential = DefaultAzureCredential(exclude_shared_token_cache_credential=True, |
73 |
| - exclude_managed_identity_credential=True) |
| 68 | + # Sky only supports Azure CLI credential for now. |
| 69 | + credential = AzureCliCredential() |
74 | 70 | self.compute_client = ComputeManagementClient(credential, subscription_id)
|
75 | 71 | self.network_client = NetworkManagementClient(credential, subscription_id)
|
76 | 72 | self.resource_client = ResourceManagementClient(credential, subscription_id)
|
|
0 commit comments