Skip to content

Commit

Permalink
Add disableRollback parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericbarthelet committed Nov 11, 2021
1 parent 0c0f6e2 commit bbd9df1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/plugins/aws/lib/updateStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ module.exports = {
params.Parameters = this.serverless.service.provider.stackParameters;
}

if (this.serverless.service.provider.disableRollback) {
delete params.OnFailure;
params.DisableRollback = this.serverless.service.provider.disableRollback;
}

return this.provider
.request('CloudFormation', 'createStack', params)
.then((cfData) => this.monitorStack('create', cfData));
Expand Down Expand Up @@ -133,6 +138,10 @@ module.exports = {
params.RollbackConfiguration = this.serverless.service.provider.rollbackConfiguration;
}

if (this.serverless.service.provider.disableRollback) {
params.DisableRollback = this.serverless.service.provider.disableRollback;
}

let cfData;
try {
cfData = await this.provider.request('CloudFormation', 'updateStack', params);
Expand Down
1 change: 1 addition & 0 deletions lib/plugins/aws/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ class AwsProvider {
},
deploymentPrefix: { type: 'string' },
disableDefaultOutputExportNames: { const: true },
disableRollback: { const: true },
endpointType: {
anyOf: ['REGIONAL', 'EDGE', 'PRIVATE'].map(caseInsensitive),
},
Expand Down

0 comments on commit bbd9df1

Please sign in to comment.