Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(postgres-manager): failing unit test from cdk-nag #128

Merged
merged 13 commits into from
Mar 3, 2024

Conversation

williamputraintan
Copy link
Member

@williamputraintan williamputraintan commented Feb 29, 2024

  • fix failing unit-test for postgres manager
    • add cdk-nag supression
    • ignore tsc check on microservice
  • promote postgres-manager microservice from cdk.construct to cdk.stack

vpc: ec2.IVpc;
lambdaSecurityGroup: ec2.ISecurityGroup;
};

export class PostgresManager extends Construct {
constructor(scope: Construct, id: string, props: PostgresManagerStackProps) {
export class PostgresManagerStack extends Stack {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmalenic am thinking of making microservice to stack instead of construct. One of the thought is that we could have the control for each microservice stack (e.g. we could deploy yarn cdk-stateless-pipeline deploy ${stateless-microservice-stack} instead of the whole stateless stack). Do you have any thoughts or perhaps objection on this?

Copy link
Member

@mmalenic mmalenic Mar 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections, I think that's a good idea. What would be the process of deploying individual microservice stacks? Would there be a individual_stacks.ts file in bin that lists all the microservices, or is there a way deploy stacks that are nested within other stacks?

Copy link
Member Author

@williamputraintan williamputraintan Mar 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, perhaps adding in the stack construct at the bin/orcabus.ts could be it and yarn cdk-orcabus ls could list all the stacks? I temporary deploy from yarn cdk-stateless-pipeline deploy ${stateless-microservice-stack} but maybe I should try defining at bin/orcabus.ts (thou might be some namespace clashes). Not sure what is the best pattern/approach yet.

Comment on lines 1 to 5
{
"name": "lambda-with-rds",
"name": "postgres-manager",
"packageManager": "[email protected]",
"dependencies": {
"@aws-sdk/client-secrets-manager": "^3.515.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in the top-level package.json?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As part of the postgres-manager lambda, it will require the secret manager sdk part of the lambda asset to retrieve the master credentials and generating the random password. So I think putting at the inner package.json should be relevant?

@williamputraintan williamputraintan merged commit d846224 into main Mar 3, 2024
2 checks passed
@williamputraintan williamputraintan deleted the fix/postgres-manager branch March 3, 2024 22:55
@williamputraintan williamputraintan linked an issue Mar 3, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

new database per microservice
3 participants