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 && `