2016-10-19 08:32:06 +02:00

29 lines
581 B
JavaScript

'use strict';
const BbPromise = require('bluebird');
module.exports = {
remove() {
this.serverless.cli.log('Removing Stack...');
const stackName = `${this.serverless.service.service}-${this.options.stage}`;
const params = {
StackName: stackName,
};
const cfData = {
StackId: stackName,
};
return this.aws.request('CloudFormation',
'deleteStack',
params,
this.options.stage,
this.options.region)
.then(() => cfData);
},
removeStack() {
return BbPromise.bind(this)
.then(this.remove);
},
};