From e95b66df30918d6d752df4d542aced6df3b8fb03 Mon Sep 17 00:00:00 2001 From: Cristian Goina Date: Fri, 1 Nov 2024 10:25:05 -0400 Subject: [PATCH] replaced HORTA_NO_ADMIN_USER_FLAG with NEW_HORTA_ENVIRONMENT which users can understand better; the flag should be true only on the first install --- cognito_stack/src/hortacloud-cognito.ts | 4 ++-- env.template | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cognito_stack/src/hortacloud-cognito.ts b/cognito_stack/src/hortacloud-cognito.ts index 556f6e8..4f9ac5d 100644 --- a/cognito_stack/src/hortacloud-cognito.ts +++ b/cognito_stack/src/hortacloud-cognito.ts @@ -36,7 +36,7 @@ export class HortaCloudCognitoStack extends Stack { } const ADMIN_GROUP_NAME = "admins"; -const DO_NOT_CREATE_ADMIN_USER:boolean = process.env.HORTA_NO_ADMIN_USER_FLAG?.toLowerCase() == 'true' ? true : false; +const NEW_HORTA_ENVIRONMENT:boolean = process.env.NEW_HORTA_ENVIRONMENT?.toLowerCase() == 'true' ? true : false; class HortaCloudCognito extends Construct { @@ -83,7 +83,7 @@ class HortaCloudCognito extends Construct { // if no admin user flag is set do not create the admin user // that should only be done if cognito users are imported from a backup - if (!DO_NOT_CREATE_ADMIN_USER) { + if (NEW_HORTA_ENVIRONMENT === true) { this.createAdminUser(); } } diff --git a/env.template b/env.template index 9990cbc..e059872 100644 --- a/env.template +++ b/env.template @@ -90,4 +90,4 @@ WORKSTATION_CACHE_DIR= # Flag used to specify not to create an admin user # this is used when users are imported from an existing backup -HORTA_NO_ADMIN_USER_FLAG=true +NEW_HORTA_ENVIRONMENT=true