From 6e00fcd7f7f4ffa44aef68dc8c390bbde492d0d4 Mon Sep 17 00:00:00 2001 From: Victor Yan Date: Thu, 16 Nov 2023 15:29:49 -0500 Subject: [PATCH] Fix wrong argument passed to updateTerminationProtection function 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();