File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,9 @@ module.exports = {
9393 this . options . region )
9494 . then ( ( result ) => {
9595 const region = this . options . region || 'us-east-1' ;
96+ const stage = this . options . stage || 'dev' ;
9697 this . stateMachineArn =
97- `arn:aws:states:${ region } :${ result . Account } :stateMachine:${ this . options . state } ` ;
98+ `arn:aws:states:${ region } :${ result . Account } :stateMachine:${ this . options . state } - ${ stage } ` ;
9899 return BbPromise . resolve ( ) ;
99100 } ) ;
100101 } ,
@@ -156,18 +157,19 @@ module.exports = {
156157 } ,
157158
158159 createStateMachine ( ) {
160+ const stage = this . options . stage || 'dev' ;
159161 return this . provider . request ( 'StepFunctions' ,
160162 'createStateMachine' ,
161163 {
162164 definition : this . awsStateLanguage [ this . options . state ] ,
163- name : this . options . state ,
165+ name : ` ${ this . options . state } - ${ stage } ` ,
164166 roleArn : this . iamRoleArn ,
165167 } ,
166168 this . options . stage ,
167169 this . options . region )
168170 . then ( ( ) => {
169171 this . serverless . cli . consoleLog ( '' ) ;
170- this . serverless . cli . log ( `Finish to deploy ${ this . options . state } step function` ) ;
172+ this . serverless . cli . log ( `Finish to deploy ${ this . options . state } - ${ stage } step function` ) ;
171173 return BbPromise . resolve ( ) ;
172174 } ) . catch ( ( error ) => {
173175 if ( error . message . match ( / S t a t e M a c h i n e i s b e i n g d e l e t e d / ) ) {
You can’t perform that action at this time.
0 commit comments