Skip to content

Commit

Permalink
Fix username generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
marrobi committed Feb 18, 2025
1 parent 34dace7 commit 0192362
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
schemaVersion: 1.0.0
name: tre-service-guacamole-linuxvm
version: 1.3.5
version: 1.2.6
description: "An Azure TRE User Resource Template for Guacamole (Linux)"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down Expand Up @@ -50,7 +50,6 @@ credentials:
- name: auth_tenant_id
env: AUTH_TENANT_ID


parameters:
- name: workspace_id
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ locals {
keyvault_name = lower("kv-${substr(local.workspace_resource_name_suffix, -20, -1)}")
storage_name = lower(replace("stg${substr(local.workspace_resource_name_suffix, -8, -1)}", "-", ""))
admin_username = (
((length(data.azuread_user.user.mail) > 0) && (contains(data.azuread_user.user.user_principal_name, "#EXT#"))) ?
length(data.azuread_user.user.mail) > 0 && contains(data.azuread_user.user.user_principal_name, "#EXT#") ?
substr(element(split("@", data.azuread_user.user.mail), 0), 0, 20) :
substr(
contains(element(split("@", data.azuread_user.user.user_principal_name), 0), "#EXT#") ?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
schemaVersion: 1.0.0
name: tre-service-guacamole-windowsvm
version: 1.2.7
version: 1.2.8
description: "An Azure TRE User Resource Template for Guacamole (Windows 10)"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ locals {
keyvault_name = lower("kv-${substr(local.workspace_resource_name_suffix, -20, -1)}")
storage_name = lower(replace("stg${substr(local.workspace_resource_name_suffix, -8, -1)}", "-", ""))
admin_username = (
((length(data.azuread_user.user.mail) > 0) && (contains(data.azuread_user.user.user_principal_name, "#EXT#"))) ?
length(data.azuread_user.user.mail) > 0 && contains(data.azuread_user.user.user_principal_name, "#EXT#") ?
substr(element(split("@", data.azuread_user.user.mail), 0), 0, 20) :
substr(
contains(element(split("@", data.azuread_user.user.user_principal_name), 0), "#EXT#") ?
Expand Down

0 comments on commit 0192362

Please sign in to comment.