Skip to content

Commit

Permalink
👽 Do not replace azuread:clientId or azuread:tenantId in stack option…
Browse files Browse the repository at this point in the history
…s since these set the provider information in the state file and cannot be changed
  • Loading branch information
jemrobinson committed Oct 25, 2024
1 parent 810d86e commit 3d5f21a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data_safe_haven/commands/sre.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,17 @@ def deploy(
if not application:
msg = f"No Entra application '{context.entra_application_name}' was found. Please redeploy your SHM."
raise DataSafeHavenConfigError(msg)
stack.add_option("azuread:clientId", application.get("appId", ""), replace=True)
stack.add_option(
"azuread:clientId", application.get("appId", ""), replace=False
)
if not context.entra_application_secret:
msg = f"No Entra application secret '{context.entra_application_secret_name}' was found. Please redeploy your SHM."
raise DataSafeHavenConfigError(msg)
stack.add_secret(
"azuread:clientSecret", context.entra_application_secret, replace=True
)
stack.add_option(
"azuread:tenantId", shm_config.shm.entra_tenant_id, replace=True
"azuread:tenantId", shm_config.shm.entra_tenant_id, replace=False
)
# Load SHM outputs
stack.add_option(
Expand Down

0 comments on commit 3d5f21a

Please sign in to comment.