File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ module.exports = {
1010 let DefinitionString ;
1111 let RoleArn ;
1212 let DependsOn ;
13+ let Name ;
14+
15+ if ( stateMachineObj . Name ) {
16+ Name = stateMachineObj . Name ;
17+ }
1318
1419 if ( stateMachineObj . definition ) {
1520 DefinitionString = JSON . stringify ( stateMachineObj . definition ) ;
@@ -47,8 +52,8 @@ module.exports = {
4752 DependsOn = 'IamRoleStateMachineExecution' ;
4853 }
4954
50- const stateMachineLogicalId = this . getStateMachineLogicalId ( stateMachineName ) ;
51- const stateMachineOutputLogicalId = this . getStateMachineOutputLogicalId ( stateMachineName ) ;
55+ const stateMachineLogicalId = this . getStateMachineLogicalId ( stateMachineName , Name ) ;
56+ const stateMachineOutputLogicalId = this . getStateMachineOutputLogicalId ( stateMachineName , Name ) ;
5257
5358 const stateMachineTemplate = `
5459 {
@@ -83,6 +88,7 @@ module.exports = {
8388 _ . merge ( this . serverless . service . provider . compiledCloudFormationTemplate . Outputs ,
8489 newStateMachineOutPutObject
8590 ) ;
91+
8692 return BbPromise . resolve ( ) ;
8793 } ) ;
8894 }
Original file line number Diff line number Diff line change 11'use strict' ;
22
33module . exports = {
4- getStateMachineLogicalId ( stateMachineName ) {
4+ getStateMachineLogicalId ( stateMachineName , Name ) {
5+ if ( Name ) {
6+ return Name ;
7+ }
58 return `${ this . provider . naming
69 . getNormalizedFunctionName ( stateMachineName ) } StepFunctionsStateMachine`;
710 } ,
811
9- getStateMachineOutputLogicalId ( stateMachineName ) {
12+ getStateMachineOutputLogicalId ( stateMachineName , Name ) {
13+ if ( Name ) {
14+ return Name ;
15+ }
1016 return `${ this . provider . naming
1117 . getNormalizedFunctionName ( stateMachineName ) } StepFunctionsStateMachineArn`;
1218 } ,
You can’t perform that action at this time.
0 commit comments