Skip to content

Commit

Permalink
Fixed getting credentials from config
Browse files Browse the repository at this point in the history
  • Loading branch information
1101-1 committed Oct 12, 2023
1 parent 4dfa355 commit f5d5d57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/azure/resoto_plugin_azure/resource/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
def get_client(subscription_id: str) -> AzureClient:
config = current_config()
azure_config = cast(AzureAccountConfig, config.azure)
return AzureClient.create(credential=azure_config.credentials(), subscription_id=subscription_id)
# Taking credentials from the config if access through the environment cannot be provided
credential = azure_config.accounts["default"].credentials()
return AzureClient.create(credential=credential, subscription_id=subscription_id)


T = TypeVar("T")
Expand Down

0 comments on commit f5d5d57

Please sign in to comment.