-
Notifications
You must be signed in to change notification settings - Fork 1
Mongo service random password #14
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
Conversation
| serviceName: string; | ||
| username: pulumi.Input<string>; | ||
| password: pulumi.Input<string>; | ||
| password?: pulumi.Input<string>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also describe in the readme that if the password is not provided it will be auto-generated.
src/components/mongo.ts
Outdated
| */ | ||
| username: pulumi.Input<string>; | ||
| /** | ||
| * Password for the master DB user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment to describe password autogeneration (same as with rds password).
src/components/mongo.ts
Outdated
| } | ||
|
|
||
| private createRandomPassword() { | ||
| return new random.RandomPassword(`${this.name}-db-password`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return new random.RandomPassword(`${this.name}-db-password`, { | |
| return new random.RandomPassword(`${this.name}-mongo-password`, { |
src/components/mongo.ts
Outdated
| return new random.RandomPassword(`${this.name}-db-password`, { | ||
| length: 16, | ||
| overrideSpecial: '_%$', | ||
| special: true, | ||
| }).result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return new random.RandomPassword(`${this.name}-db-password`, { | |
| length: 16, | |
| overrideSpecial: '_%$', | |
| special: true, | |
| }).result; | |
| const password = new random.RandomPassword(`${this.name}-db-password`, { | |
| length: 16, | |
| overrideSpecial: '_%$', | |
| special: true, | |
| }); | |
| return password.result; |
Feel free to ignore this readability improvement if you don't like it.
This PR adds random password to mongo service if no password is provided