Skip to content

Commit 33ce7bf

Browse files
Chore: [AEA-5803] - adopt new PSU secrets stack (#2511)
## Summary - 🤖 Operational or Infrastructure Change ### Details Step 2 of 3. PSU secrets have been created and populated, now to start using them from the lambda Co-authored-by: Connor Avery <[email protected]>
1 parent b3bbb3a commit 33ce7bf

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

SAMtemplates/functions/main.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,12 @@ Resources:
431431
LOG_LEVEL: !Ref LogLevel
432432
NHS_NOTIFY_PRESCRIPTIONS_SQS_QUEUE_URL: !Ref NHSNotifyPrescriptionsSQSQueueUrl
433433
TABLE_NAME: !Ref PrescriptionNotificationStatesTableName
434-
API_KEY_SECRET: secrets-PSU-Notify-API-Key
435-
PRIVATE_KEY_SECRET: secrets-PSU-Notify-PrivateKey
436-
KID_SECRET: secrets-PSU-Notify-Application-KID
434+
API_KEY_SECRET:
435+
Fn::ImportValue: !Sub ${StackName}-PSU-Notify-API-Key
436+
PRIVATE_KEY_SECRET:
437+
Fn::ImportValue: !Sub ${StackName}-PSU-Notify-PrivateKey
438+
KID_SECRET:
439+
Fn::ImportValue: !Sub ${StackName}-PSU-Notify-KID
437440
NHS_NOTIFY_ROUTING_ID_PARAM: !Ref NotifyRoutingPlanIDParam
438441
NOTIFY_API_BASE_URL_PARAM: !Ref NotifyAPIBaseURLParam
439442
MAKE_REAL_NOTIFY_REQUESTS_PARAM: !Ref EnableNotificationsExternalParam
@@ -497,8 +500,10 @@ Resources:
497500
Variables:
498501
LOG_LEVEL: !Ref LogLevel
499502
TABLE_NAME: !Ref PrescriptionNotificationStatesTableName
500-
APP_ID_SECRET: secrets-PSU-Notify-Application-ID
501-
API_KEY_SECRET: secrets-PSU-Notify-API-Key
503+
APP_ID_SECRET:
504+
Fn::ImportValue: !Sub ${StackName}-PSU-Notify-Application-ID
505+
API_KEY_SECRET:
506+
Fn::ImportValue: !Sub ${StackName}-PSU-Notify-API-Key
502507
Metadata:
503508
BuildMethod: esbuild
504509
guard:

0 commit comments

Comments
 (0)