Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -989,24 +989,24 @@ provider:
name: aws
apiGateway:
apiKeys:
- myFirstKey
- ${opt:stage}-myFirstKey
- ${env:MY_API_KEY} # you can hide it in a serverless variable
- name: myKeyWithValue # object form — lets you set a specific key value
value: myApiKeyValue
usagePlan:
quota:
limit: 5000
offset: 2
period: MONTH
throttle:
burstLimit: 200
rateLimit: 100
- myFirstKey
- ${opt:stage}-myFirstKey
- ${env:MY_API_KEY} # you can hide it in a serverless variable
- name: myKeyWithValue # object form — lets you set a specific key value
value: myApiKeyValue
usagePlan:
quota:
limit: 5000
offset: 2
period: MONTH
throttle:
burstLimit: 200
rateLimit: 100
functions:
hello:
handler: handler.hello

stepFunctions:
stepFunctions:
stateMachines:
statemachine1:
name: ${self:service}-${opt:stage}-statemachine1
Expand Down
22 changes: 22 additions & 0 deletions lib/deploy/stepFunctions/compileStateMachines.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,28 @@ describe('#compileStateMachines', () => {
serverlessStepFunctions.compileStateMachines();
});

it('should not fail validation when definition contains pseudo-parameters', () => {
serverless.service.stepFunctions = {
stateMachines: {
myStateMachine1: {
definition: {
StartAt: 'CheckAirtable',
States: {
CheckAirtable: {
Type: 'Task',
Resource: 'arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:my-service-dev-checkairtable',
End: true,
},
},
},
},
},
validate: true,
};
// Pseudo-parameters (#{...}) must not cause validation to fail — regression test for #291
expect(() => serverlessStepFunctions.compileStateMachines()).to.not.throw();
});

it('should replace pseudo parameters that starts with #', () => {
const definition = {
StartAt: 'A',
Expand Down
Loading