Skip to content

Commit

Permalink
fix: typo in username key
Browse files Browse the repository at this point in the history
  • Loading branch information
Hi-Fi committed Sep 27, 2022
1 parent 8804da5 commit e604085
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Name | Type | Description
-----|------|-------------
**secret** | <code>[aws_secretsmanager.ISecret](#aws-cdk-lib-aws-secretsmanager-isecret)</code> | Reference to secret where credentials are stored.
**passwordKey**? | <code>string</code> | Key containing password.<br/>__*Optional*__
**usenameKey**? | <code>string</code> | Key containing username.<br/>__*Optional*__
**usernameKey**? | <code>string</code> | Key containing username.<br/>__*Optional*__



2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export interface ISecret {
/**
* Key containing username
*/
usenameKey?: string;
usernameKey?: string;
/**
* Key containing password
*/
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { ICredentials, LambdaCredentials } from './types';
export const formatCredentials = (creds?: ICredentials): LambdaCredentials => ({
plainText: creds?.plainText ? `${creds?.plainText?.userName}:${creds?.plainText?.password}` : undefined,
secretArn: creds?.secretManager?.secret.secretArn,
usernameKey: creds?.secretManager?.usenameKey,
usernameKey: creds?.secretManager?.usernameKey,
passwordKey: creds?.secretManager?.passwordKey,
});
2 changes: 1 addition & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('stack with key-value secret', () => {
src: new DockerImageName('javacs3/javacs3:latest', {
secretManager: {
secret: sm.Secret.fromSecretNameV2(stack, 'SrcSecret', 'key-value-secret'),
usenameKey: 'username',
usernameKey: 'username',
passwordKey: 'password',
},
}),
Expand Down

0 comments on commit e604085

Please sign in to comment.