Skip to content

Commit 4b79e32

Browse files
committed
Forgot to specify arn export. Also, use stackname parameter
1 parent d4ac39a commit 4b79e32

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

SAMtemplates/messaging/main.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Resources:
1111
NHSNotifyPrescriptionsSQSQueue:
1212
Type: AWS::SQS::Queue
1313
Properties:
14-
QueueName: !Sub ${AWS::StackName}-NHSNotifyPrescriptions
14+
QueueName: !Sub ${StackName}-NHSNotifyPrescriptions
1515
KmsMasterKeyId: !ImportValue account-resources:SqsKMSKey
1616
# TODO: Later, I think 1 day will not be enough. But for now, expiry is the only way to remove messages!
1717
MessageRetentionPeriod: 86400 # 1 day in seconds
@@ -23,7 +23,7 @@ Resources:
2323
NHSNotifyPrescriptionsDeadLetterQueue:
2424
Type: AWS::SQS::Queue
2525
Properties:
26-
QueueName: !Sub ${AWS::StackName}-NHSNotifyPrescriptionsDeadLetter
26+
QueueName: !Sub ${StackName}-NHSNotifyPrescriptionsDeadLetter
2727
KmsMasterKeyId: !ImportValue account-resources:SqsKMSKey
2828
MessageRetentionPeriod: 604800 # 1 week in seconds
2929
VisibilityTimeout: 60
@@ -45,7 +45,7 @@ Resources:
4545
WriteNHSNotifyPrescriptionsSQSQueuePolicy:
4646
Type: AWS::IAM::ManagedPolicy
4747
Properties:
48-
ManagedPolicyName: !Sub ${AWS::StackName}-NHSNotifyPrescriptionsSendMessagePolicy
48+
ManagedPolicyName: !Sub ${StackName}-NHSNotifyPrescriptionsSendMessagePolicy
4949
PolicyDocument:
5050
Version: "2012-10-17"
5151
Statement:
@@ -60,23 +60,23 @@ Outputs:
6060
Description: The URL of the NHS Notify Prescriptions SQS Queue
6161
Value: !Ref NHSNotifyPrescriptionsSQSQueue
6262
Export:
63-
Name: !Sub ${AWS::StackName}-NHSNotifyPrescriptionsSQSQueueUrl
63+
Name: !Sub ${StackName}-NHSNotifyPrescriptionsSQSQueueUrl
6464

6565
NHSNotifyPrescriptionsSQSQueueArn:
6666
Description: The ARN of the NHS Notify Prescriptions SQS Queue
6767
Value: !GetAtt NHSNotifyPrescriptionsSQSQueue.Arn
6868
Export:
69-
Name: !Sub ${AWS::StackName}-NHSNotifyPrescriptionsSQSQueueArn
69+
Name: !Sub ${StackName}-NHSNotifyPrescriptionsSQSQueueArn
7070

7171
ReadNHSNotifyPrescriptionsSQSQueuePolicyArn:
7272
Description: ARN of policy granting permission to read the prescriptions queue
73-
Value: !Ref ReadNHSNotifyPrescriptionsSQSQueuePolicy
73+
Value: !Ref ReadNHSNotifyPrescriptionsSQSQueuePolicy.Arn
7474
Export:
75-
Name: !Sub ${AWS::StackName}-ReadNHSNotifyPrescriptionsSQSQueuePolicyArn
75+
Name: !Sub ${StackName}-ReadNHSNotifyPrescriptionsSQSQueuePolicyArn
7676

7777

7878
WriteNHSNotifyPrescriptionsSQSQueuePolicyArn:
7979
Description: ARN of policy granting permission to write to the prescriptions queue
80-
Value: !Ref WriteNHSNotifyPrescriptionsSQSQueuePolicy
80+
Value: !Ref WriteNHSNotifyPrescriptionsSQSQueuePolicy.Arn
8181
Export:
82-
Name: !Sub ${AWS::StackName}-WriteNHSNotifyPrescriptionsSQSQueuePolicyArn
82+
Name: !Sub ${StackName}-WriteNHSNotifyPrescriptionsSQSQueuePolicyArn

0 commit comments

Comments
 (0)