mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
fix: Ensure CF stacks are deleted on failed creaton attempt (#7158)
Until now, failed stack deploys when using deploymentBucket to specify an existing bucket were left in ROLLBACK_COMPLETE state. This required manual 'sls remove' before a redeploy. Fixes #6612, follow-up of incomplete fix in #5631
This commit is contained in:
parent
a8739fe33b
commit
53a18cbff6
@ -24,7 +24,7 @@ module.exports = {
|
||||
|
||||
const params = {
|
||||
StackName: stackName,
|
||||
OnFailure: 'ROLLBACK',
|
||||
OnFailure: 'DELETE',
|
||||
Capabilities: ['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM'],
|
||||
Parameters: [],
|
||||
TemplateURL: templateUrl,
|
||||
|
||||
@ -51,7 +51,7 @@ describe('updateStack', () => {
|
||||
expect(
|
||||
createStackStub.calledWithExactly('CloudFormation', 'createStack', {
|
||||
StackName: awsDeploy.provider.naming.getStackName(),
|
||||
OnFailure: 'ROLLBACK',
|
||||
OnFailure: 'DELETE',
|
||||
Capabilities: ['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM'],
|
||||
Parameters: [],
|
||||
TemplateURL: `https://s3.amazonaws.com/${awsDeploy.bucketName}/${awsDeploy.serverless.service.package.artifactDirectoryName}/${compiledTemplateFileName}`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user