in src/keycloak.ts [344:360]
constructor(scope: cdk.Construct, id: string, props: DatabaseProps) {
super(scope, id);
this.vpc = props.vpc;
const config = props.auroraServerless ? this._createServerlessCluster(props)
: props.singleDbInstance ? this._createRdsInstance(props) : this._createRdsCluster(props);
this.secret = config.secret;
// allow internally from the same security group
config.connections.allowInternally(ec2.Port.tcp(this._mysqlListenerPort));
// allow from the whole vpc cidr
config.connections.allowFrom(ec2.Peer.ipv4(props.vpc.vpcCidrBlock), ec2.Port.tcp(this._mysqlListenerPort));
this.clusterEndpointHostname = config.endpoint;
this.clusterIdentifier = config.identifier;
this.connections = config.connections;
printOutput(this, 'DBSecretArn', config.secret.secretArn);
printOutput(this, 'clusterEndpointHostname', this.clusterEndpointHostname);
printOutput(this, 'clusterIdentifier', this.clusterIdentifier);
}