Skip to content

Commit eb7e69f

Browse files
committed
[sdlf-pipeline] remove pStageName parameter
pPipelineName and pStageName, and pDeploymentInstance have a similar purpose
1 parent 66fb0f3 commit eb7e69f

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

sdlf-pipeline/src/pipeline.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Parameters:
1010
Type: String
1111
Description: A string uniquely identifying this deployment in this AWS account
1212
Default: pipeline
13+
AllowedPattern: "[a-zA-Z0-9\\-]{1,20}"
1314
pDatasetDeploymentInstance:
1415
Type: String
1516
Description: The string uniquely identifying a sdlf-dataset deployment in this AWS account
@@ -30,10 +31,6 @@ Parameters:
3031
Description: The name of the dataset (all lowercase, no symbols or spaces)
3132
Type: String
3233
AllowedPattern: "[a-z0-9]{2,14}"
33-
pStageName:
34-
Description: Name of the stage (all lowercase, hyphen allowed, no other symbols or spaces)
35-
Type: String
36-
AllowedPattern: "[a-zA-Z0-9\\-]{1,12}"
3734
pStageEnabled:
3835
Description: Whether the stage is enabled or not
3936
Type: String
@@ -72,7 +69,7 @@ Resources:
7269
DeletionPolicy: Delete
7370
UpdateReplacePolicy: Delete
7471
Properties:
75-
QueueName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-dlq-${pStageName}.fifo
72+
QueueName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-dlq.fifo
7673
FifoQueue: True
7774
MessageRetentionPeriod: 1209600
7875
VisibilityTimeout: 60
@@ -85,15 +82,15 @@ Resources:
8582
Name: !Sub /sdlf/pipeline/rDeadLetterQueueRoutingStep/${pDeploymentInstance}
8683
Type: String
8784
Value: !GetAtt rDeadLetterQueueRoutingStep.QueueName
88-
Description: !Sub "Name of the ${pStageName} ${pDataset} ${pDeploymentInstance} DLQ"
85+
Description: !Sub "Name of the ${pDataset} ${pDeploymentInstance} DLQ"
8986

9087
rQueueRoutingStep:
9188
Type: AWS::SQS::Queue
9289
Condition: HasSourceEvents
9390
DeletionPolicy: Delete
9491
UpdateReplacePolicy: Delete
9592
Properties:
96-
QueueName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-queue-${pStageName}.fifo
93+
QueueName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-queue.fifo
9794
FifoQueue: True
9895
ContentBasedDeduplication: True
9996
RedrivePolicy:
@@ -110,22 +107,22 @@ Resources:
110107
Name: !Sub /sdlf/pipeline/rQueueRoutingStep/${pDeploymentInstance}
111108
Type: String
112109
Value: !GetAtt rQueueRoutingStep.QueueName
113-
Description: !Sub "Name of the ${pStageName} ${pDataset} ${pDeploymentInstance} Queue"
110+
Description: !Sub "Name of the ${pDataset} ${pDeploymentInstance} Queue"
114111

115112
rStageRule:
116113
Type: AWS::Events::Rule
117114
Condition: HasSourceEvents
118115
Properties:
119-
Name: !Sub sdlf-${pDataset}-${pDeploymentInstance}-rule-${pStageName}
120-
Description: !Sub Send events to ${pStageName} queue
116+
Name: !Sub sdlf-${pDataset}-${pDeploymentInstance}-rule
117+
Description: !Sub Send events to ${pDeploymentInstance} queue
121118
EventPattern: !Ref pEventPattern
122119
EventBusName: !If [FetchFromDatasetSsm, !Sub "{{resolve:ssm:/sdlf/dataset/rEventBus/${pDatasetDeploymentInstance}}}", !Ref pEventBus]
123120
State: !If
124121
- StageEnabled
125122
- ENABLED
126123
- DISABLED
127124
Targets:
128-
- Id: !Sub sdlf-${pDataset}-${pDeploymentInstance}-rule-${pStageName}
125+
- Id: !Sub sdlf-${pDataset}-${pDeploymentInstance}-rule
129126
Arn: !GetAtt rQueueRoutingStep.Arn
130127
SqsParameters:
131128
MessageGroupId: !Sub ${pDataset}-${pDeploymentInstance}
@@ -195,10 +192,10 @@ Resources:
195192
Type: AWS::Scheduler::Schedule
196193
Condition: ScheduleBased
197194
Properties:
198-
Description: !Sub Trigger ${pStageName} Routing Lambda on a specified schedule
195+
Description: !Sub Trigger ${pDeploymentInstance} Routing Lambda on a specified schedule
199196
GroupName: !If [FetchFromDatasetSsm, !Sub "{{resolve:ssm:/sdlf/dataset/rScheduleGroup/${pDatasetDeploymentInstance}}}", !Ref pScheduleGroup]
200197
KmsKeyArn: !If [FetchFromDatasetSsm, !Sub "{{resolve:ssm:/sdlf/dataset/rKMSInfraKey/${pDatasetDeploymentInstance}}}", !Ref pInfraKmsKey]
201-
Name: !Sub sdlf-${pDataset}-${pDeploymentInstance}-schedule-rule-${pStageName}
198+
Name: !Sub sdlf-${pDataset}-${pDeploymentInstance}-schedule-rule
202199
ScheduleExpression: !Ref pSchedule
203200
FlexibleTimeWindow:
204201
Mode: "OFF"
@@ -215,13 +212,13 @@ Resources:
215212
{
216213
"FunctionName": "${pLambdaRoutingStep}",
217214
"InvocationType": "Event",
218-
"Payload": "{\n \"dataset\": \"${pDataset}\",\n \"pipeline_stage\": \"${pStageName}\",\n \"trigger_type\": \"${pTriggerType}\",\n \"event_pattern\": \"true\"\n }"
215+
"Payload": "{\n \"dataset\": \"${pDataset}\",\n \"pipeline_stage\": \"${pDeploymentInstance}\",\n \"trigger_type\": \"${pTriggerType}\",\n \"event_pattern\": \"true\"\n }"
219216
}
220217
- !Sub >-
221218
{
222219
"FunctionName": "${pLambdaRoutingStep}",
223220
"InvocationType": "Event",
224-
"Payload": "{\n \"dataset\": \"${pDataset}\",\n \"pipeline_stage\": \"${pStageName}\",\n \"trigger_type\": \"${pTriggerType}\"\n }"
221+
"Payload": "{\n \"dataset\": \"${pDataset}\",\n \"pipeline_stage\": \"${pDeploymentInstance}\",\n \"trigger_type\": \"${pTriggerType}\"\n }"
225222
}
226223
227224
Outputs:

0 commit comments

Comments
 (0)