From e84056db711eb823c4dfcd110da228dd23d693a4 Mon Sep 17 00:00:00 2001 From: Joao Luiz Fernandes Date: Thu, 25 Apr 2019 19:06:53 -0300 Subject: [PATCH] Adding support to the user optionally set the 'stackName' when using stackName different fo the serviceName --- src/plugin.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugin.ts b/src/plugin.ts index 0189df5..2dba60b 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -27,10 +27,13 @@ export default class StackOutputPlugin { } get stackName () { - return util.format('%s-%s', - this.serverless.service.getServiceName(), - this.serverless.getProvider('aws').getStage() - ) + if (this.serverless.service.custom.output.stackName === undefined) + return util.format('%s-%s', + this.serverless.service.getServiceName(), + this.serverless.getProvider('aws').getStage() + ) + else + return this.serverless.service.custom.output.stackName } private hasConfig (key: string) {