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 = {
10
10
let DefinitionString ;
11
11
let RoleArn ;
12
12
let DependsOn ;
13
+ let Name ;
14
+
15
+ if ( stateMachineObj . Name ) {
16
+ Name = stateMachineObj . Name ;
17
+ }
13
18
14
19
if ( stateMachineObj . definition ) {
15
20
DefinitionString = JSON . stringify ( stateMachineObj . definition ) ;
@@ -47,8 +52,8 @@ module.exports = {
47
52
DependsOn = 'IamRoleStateMachineExecution' ;
48
53
}
49
54
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 ) ;
52
57
53
58
const stateMachineTemplate = `
54
59
{
@@ -83,6 +88,7 @@ module.exports = {
83
88
_ . merge ( this . serverless . service . provider . compiledCloudFormationTemplate . Outputs ,
84
89
newStateMachineOutPutObject
85
90
) ;
91
+
86
92
return BbPromise . resolve ( ) ;
87
93
} ) ;
88
94
}
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
module . exports = {
4
- getStateMachineLogicalId ( stateMachineName ) {
4
+ getStateMachineLogicalId ( stateMachineName , Name ) {
5
+ if ( Name ) {
6
+ return Name ;
7
+ }
5
8
return `${ this . provider . naming
6
9
. getNormalizedFunctionName ( stateMachineName ) } StepFunctionsStateMachine`;
7
10
} ,
8
11
9
- getStateMachineOutputLogicalId ( stateMachineName ) {
12
+ getStateMachineOutputLogicalId ( stateMachineName , Name ) {
13
+ if ( Name ) {
14
+ return Name ;
15
+ }
10
16
return `${ this . provider . naming
11
17
. getNormalizedFunctionName ( stateMachineName ) } StepFunctionsStateMachineArn`;
12
18
} ,
You can’t perform that action at this time.
0 commit comments