From 2a2b455ed72c1dcf475288d0cd3ed6f88dfc9d48 Mon Sep 17 00:00:00 2001 From: Kern Walster Date: Mon, 4 Nov 2024 11:34:25 -0800 Subject: [PATCH] Add termination proection to pipeline stage Signed-off-by: Kern Walster --- lib/finch-pipeline-app-stage.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/finch-pipeline-app-stage.ts b/lib/finch-pipeline-app-stage.ts index cbedb6b..66a3a81 100644 --- a/lib/finch-pipeline-app-stage.ts +++ b/lib/finch-pipeline-app-stage.ts @@ -11,6 +11,7 @@ import { ECRRepositoryStack } from './ecr-repo-stack'; import { EventBridgeScanNotifsStack } from './event-bridge-scan-notifs-stack'; import { PVREReportingStack } from './pvre-reporting-stack'; import { SSMPatchingStack } from './ssm-patching-stack'; +import { applyTerminationProtectionOnStacks } from './aspects/stack-termination-protection'; export enum ENVIRONMENT_STAGE { Beta, @@ -31,6 +32,7 @@ export class FinchPipelineAppStage extends cdk.Stage { constructor(scope: Construct, id: string, props: FinchPipelineAppStageProps) { super(scope, id, props); + applyTerminationProtectionOnStacks([this]); props.runnerConfig.runnerTypes.forEach((runnerType) => { const ASGStackName = `ASG-${runnerType.platform}-${runnerType.repo}-${runnerType.version.split('.')[0]}-${runnerType.arch}Stack`; let licenseArn: string | undefined;