in src/keycloak.ts [412:430]
private _createServerlessCluster(props: DatabaseProps): DatabaseCofig {
const dbCluster = new rds.ServerlessCluster(this, 'AuroraServerlessCluster', {
engine: rds.DatabaseClusterEngine.AURORA_MYSQL,
vpc: props.vpc,
defaultDatabaseName: 'keycloak',
vpcSubnets: props.databaseSubnets,
credentials: rds.Credentials.fromGeneratedSecret('admin'),
backupRetention: props.backupRetention ?? cdk.Duration.days(7),
deletionProtection: true,
removalPolicy: cdk.RemovalPolicy.RETAIN,
parameterGroup: rds.ParameterGroup.fromParameterGroupName(this, 'ParameterGroup', 'default.aurora-mysql5.7'),
});
return {
connections: dbCluster.connections,
endpoint: dbCluster.clusterEndpoint.hostname,
identifier: dbCluster.clusterIdentifier,
secret: dbCluster.secret!,
};
}