From 55309288a161a8b6c6485835858b232670f175c9 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Fri, 16 Aug 2024 17:37:50 -0700 Subject: [PATCH] Fix path and remove env Signed-off-by: Sayali Gaikawad --- keycloak/bin/keycloak.ts | 5 ----- keycloak/lib/stacks/keycloak.ts | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/keycloak/bin/keycloak.ts b/keycloak/bin/keycloak.ts index acbe993..fd565a6 100644 --- a/keycloak/bin/keycloak.ts +++ b/keycloak/bin/keycloak.ts @@ -26,14 +26,12 @@ const vpcStack = new VpcStack(app, 'keycloakVPC', {}); // Create utilities required by different components of KeyCloak const utilsStack = new KeycloakUtils(app, 'KeyCloakUtils', { - env: { account, region }, hostedZone: HOSTED_ZONE, internalHostedZone: INTERNAL_HOSTED_ZONE, }); // Create RDS database const rdsDBStack = new RdsStack(app, 'KeycloakRDS', { - env: { account, region }, vpc: vpcStack.vpc, rdsDbSecurityGroup: vpcStack.rdsDbSecurityGroup, rdsAdminPassword: utilsStack.keycloakDbPassword, @@ -42,7 +40,6 @@ rdsDBStack.node.addDependency(vpcStack, utilsStack); // Deploy and install Public KeyCloak on EC2 const keycloakStack = new KeycloakStack(app, 'PublicKeycloak', { - env: { account, region }, vpc: vpcStack.vpc, keycloakSecurityGroup: vpcStack.keyCloaksecurityGroup, certificateArn: utilsStack.certificateArn, @@ -59,7 +56,6 @@ keycloakStack.node.addDependency(vpcStack, rdsDBStack, utilsStack); // Deploy and install Internal KeyCloak on EC2 const keycloakInternalStack = new KeycloakStack(app, 'InternalKeycloak', { - env: { account, region }, vpc: vpcStack.vpc, keycloakSecurityGroup: vpcStack.keycloakInternalSecurityGroup, certificateArn: utilsStack.internalCertificateArn, @@ -78,7 +74,6 @@ keycloakInternalStack.node.addDependency(vpcStack, rdsDBStack, utilsStack); // Create WAF stack const wafStack = new KeycloakWAF(app, 'KeycloakWAFstack', { - env: { account, region }, loadBalancerArn: keycloakStack.loadBalancerArn, internalLoadBalancerArn: keycloakInternalStack.loadBalancerArn, }); diff --git a/keycloak/lib/stacks/keycloak.ts b/keycloak/lib/stacks/keycloak.ts index c430d13..9e3e5c5 100644 --- a/keycloak/lib/stacks/keycloak.ts +++ b/keycloak/lib/stacks/keycloak.ts @@ -158,7 +158,7 @@ export class KeycloakStack extends Stack { InitPackage.yum('docker'), InitCommand.shellCommand('sudo curl -L https://github.com/docker/compose/releases/download/v2.9.0/docker-compose-$(uname -s)-$(uname -m) ' + '-o /usr/bin/docker-compose && sudo chmod +x /usr/bin/docker-compose'), - InitFile.fromFileInline('/docker-compose.yml', join(__dirname, '../resources/docker-compose.yml')), + InitFile.fromFileInline('/docker-compose.yml', join(__dirname, '../../resources/docker-compose.yml')), InitCommand.shellCommand('touch /.env'), InitCommand.shellCommand(`echo KC_DB_PASSWORD=$(aws --region ${region} secretsmanager get-secret-value` + ` --secret-id ${props.keycloakDBpasswordSecretArn} --query SecretString --output text) > /.env && ` @@ -175,7 +175,7 @@ export class KeycloakStack extends Stack { InitPackage.yum('docker'), InitCommand.shellCommand('sudo curl -L https://github.com/docker/compose/releases/download/v2.9.0/docker-compose-$(uname -s)-$(uname -m) ' + '-o /usr/bin/docker-compose && sudo chmod +x /usr/bin/docker-compose'), - InitFile.fromFileInline('/docker-compose.yml', join(__dirname, '../resources/internal-docker-compose.yml')), + InitFile.fromFileInline('/docker-compose.yml', join(__dirname, '../../resources/internal-docker-compose.yml')), InitCommand.shellCommand('touch /.env'), InitCommand.shellCommand(`echo KC_DB_PASSWORD=$(aws --region ${region} secretsmanager get-secret-value` + ` --secret-id ${props.keycloakDBpasswordSecretArn} --query SecretString --output text) > /.env && `