Skip to content

Commit

Permalink
Retrieve SRE sub name and use that when connecting to guac database
Browse files Browse the repository at this point in the history
  • Loading branch information
craddm authored and jemrobinson committed Jan 10, 2025
1 parent 31d60b8 commit 7b1a50b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data_safe_haven/administration/users/guacamole_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ def __init__(
pulumi_config=pulumi_config,
)
# Read the SRE database secret from key vault
azure_sdk = AzureSdk(context.subscription_name)
azure_sdk = AzureSdk(subscription_name=context.subscription_name)
sre_subscription_name = azure_sdk.get_subscription_name(
config.azure.subscription_id
)
connection_db_server_password = azure_sdk.get_keyvault_secret(
sre_stack.output("data")["key_vault_name"],
sre_stack.output("data")["password_user_database_admin_secret"],
Expand All @@ -33,7 +36,7 @@ def __init__(
connection_db_server_password,
sre_stack.output("remote_desktop")["connection_db_server_name"],
sre_stack.output("remote_desktop")["resource_group_name"],
context.subscription_name,
sre_subscription_name,
)
self.users_: Sequence[ResearchUser] | None = None
self.postgres_script_path: pathlib.Path = (
Expand Down

0 comments on commit 7b1a50b

Please sign in to comment.