fix: use convention for config variables inside sesConfig
Signed-off-by: Stephanie Swaney <stephanie.swaney.ddk6@statefarm.com>
This commit is contained in:
@@ -81,9 +81,9 @@ notifications:
|
||||
receiver: 'users'
|
||||
# Optional SES config
|
||||
# sesConfig:
|
||||
# SourceArn: 'arn:aws:ses:us-west-2:123456789012:identity/example.com'
|
||||
# FromArn: 'arn:aws:ses:us-west-2:123456789012:identity/example.com'
|
||||
# ConfigurationSetName: 'custom-config'
|
||||
# sourceArn: 'arn:aws:ses:us-west-2:123456789012:identity/example.com'
|
||||
# fromArn: 'arn:aws:ses:us-west-2:123456789012:identity/example.com'
|
||||
# configurationSetName: 'custom-config'
|
||||
# How many emails to send concurrently, defaults to 2
|
||||
concurrencyLimit: 10
|
||||
# How much to throttle between emails, defaults to 100ms
|
||||
|
||||
+3
-3
@@ -139,15 +139,15 @@ export interface Config {
|
||||
/**
|
||||
* ARN of the identity to use as the source of the email
|
||||
*/
|
||||
SourceArn?: string;
|
||||
sourceArn?: string;
|
||||
/**
|
||||
* ARN of the identity to use for the "From"/sender address of the email
|
||||
*/
|
||||
FromArn?: string;
|
||||
fromArn?: string;
|
||||
/**
|
||||
* Name of the configuration set to use when sending email via ses
|
||||
*/
|
||||
ConfigurationSetName?: string;
|
||||
configurationSetName?: string;
|
||||
};
|
||||
cache?: {
|
||||
/**
|
||||
|
||||
+2
-2
@@ -458,9 +458,9 @@ describe('NotificationsEmailProcessor', () => {
|
||||
sender: 'backstage@backstage.io',
|
||||
replyTo: 'no-reply@backstage.io',
|
||||
sesConfig: {
|
||||
SourceArn:
|
||||
sourceArn:
|
||||
'arn:aws:ses:us-west-2:123456789012:identity/example.com',
|
||||
FromArn:
|
||||
fromArn:
|
||||
'arn:aws:ses:us-west-2:123456789012:identity/example.com',
|
||||
},
|
||||
},
|
||||
|
||||
+3
-3
@@ -299,10 +299,10 @@ export class NotificationsEmailProcessor implements NotificationProcessor {
|
||||
return undefined;
|
||||
}
|
||||
const ses: Record<string, string> = {};
|
||||
const sourceArn = this.sesConfig.getOptionalString('SourceArn');
|
||||
const fromArn = this.sesConfig.getOptionalString('FromArn');
|
||||
const sourceArn = this.sesConfig.getOptionalString('sourceArn');
|
||||
const fromArn = this.sesConfig.getOptionalString('fromArn');
|
||||
const configurationSetName = this.sesConfig.getOptionalString(
|
||||
'ConfigurationSetName',
|
||||
'configurationSetName',
|
||||
);
|
||||
|
||||
if (sourceArn) ses.SourceArn = sourceArn;
|
||||
|
||||
Reference in New Issue
Block a user