From f93a132463d3535f1ed29f88f87f2f5923025043 Mon Sep 17 00:00:00 2001 From: Victor Yan Date: Thu, 30 Nov 2023 11:05:02 -0500 Subject: [PATCH] Fix wrong argument passed to updateTerminationProtection function (#1197) The updateTerminationProtection function is getting a wrong argument "stack.id" which resulting the termination protection for stack not lifted and deletion of stack fail. --- src/deployments/cdk/toolkit.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/deployments/cdk/toolkit.ts b/src/deployments/cdk/toolkit.ts index d84432cc6..201dedbc0 100644 --- a/src/deployments/cdk/toolkit.ts +++ b/src/deployments/cdk/toolkit.ts @@ -261,7 +261,7 @@ export class CdkToolkit { this.deploymentLog(stack, 'Disabling termination protection'); await cfn .updateTerminationProtection({ - StackName: stack.id, + StackName: stack.stackName, EnableTerminationProtection: false, }) .promise(); @@ -352,7 +352,7 @@ export class CdkToolkit { this.deploymentLog(stack, 'Disabling termination protection'); await cfn .updateTerminationProtection({ - StackName: stack.id, + StackName: stack.stackName, EnableTerminationProtection: false, }) .promise();