Frank Schmid 81c896bc12
Removed reintroduction of stage+region in request. Added options.
Delete bucket was still using them

Hopefully all :)

Further test fixes.

.... worked too long yesterday

Fixed Variable tests

Remove not used parameters from request() and add options with warning
2017-12-11 12:33:35 +01:00

32 lines
635 B
JavaScript

'use strict';
const BbPromise = require('bluebird');
module.exports = {
remove() {
this.serverless.cli.log('Removing Stack...');
const stackName = this.provider.naming.getStackName();
const params = {
StackName: stackName,
};
if (this.serverless.service.provider.cfnRole) {
params.RoleARN = this.serverless.service.provider.cfnRole;
}
const cfData = {
StackId: stackName,
};
return this.provider.request('CloudFormation',
'deleteStack',
params)
.then(() => cfData);
},
removeStack() {
return BbPromise.bind(this)
.then(this.remove);
},
};