fix: use convention for config variables inside sesConfig

Signed-off-by: Stephanie Swaney <stephanie.swaney.ddk6@statefarm.com>
This commit is contained in:
Stephanie Swaney
2025-06-24 09:02:50 -05:00
parent 94a30fed5a
commit 990edb5274
4 changed files with 11 additions and 11 deletions
@@ -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
View File
@@ -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?: {
/**
@@ -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',
},
},
@@ -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;