Skip to content

Commit

Permalink
Use azurecli (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-at-luther authored Oct 10, 2023
1 parent f5ec2f1 commit 16bc1af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/keyvault.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential
from azure.identity import AzureCliCredential

def get_secret(az_vault, az_vault_key):
vault_uri = f'https://{az_vault}.vault.azure.net'
credential = DefaultAzureCredential()
credential = AzureCliCredential()
client = SecretClient(vault_url=vault_uri, credential=credential)
return client.get_secret(az_vault_key).value
return client.get_secret(az_vault_key).value

0 comments on commit 16bc1af

Please sign in to comment.