in cdk/lib/cdk-pipeline-stack.ts [18:41]
constructor(scope: Construct, id: string, props?: AppStageProps) {
super(scope, id, props);
const vpcStack = new VpcStack(this, "VPCStack");
this.rdsStack = new RDSStack(this, "RDSStack", {
vpc: vpcStack.vpc,
securityGroup: vpcStack.ingressSecurityGroup,
stage: id,
secretReplicationRegions: props?.secretReplicationRegions || [],
primaryRdsInstance: props?.primaryRdsInstance
});
this.apiStack = new GraphqlApiStack(this, "APIStack", {
vpc: vpcStack.vpc,
inboundDbAccessSecurityGroup:
this.rdsStack.postgresRDSInstance.connections.securityGroups[0].securityGroupId,
rdsEndpoint: this.rdsStack.postgresRDSInstance.dbInstanceEndpointAddress,
rdsDbUser: this.rdsStack.rdsDbUser,
rdsDbName: this.rdsStack.rdsDbName,
rdsPort: this.rdsStack.rdsPort,
rdsPasswordSecretName: this.rdsStack.rdsDatabasePasswordSecretName.value,
});
}