From 01215635894838367e5eb1601ba590f06f0204d6 Mon Sep 17 00:00:00 2001 From: Mikko Siukola Date: Wed, 8 Jan 2025 11:57:51 +0200 Subject: [PATCH] Fix config value propagation --- cdk/lib/config.ts | 1 + cdk/lib/ecs-stack.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cdk/lib/config.ts b/cdk/lib/config.ts index 37cc5f4..a290a5d 100644 --- a/cdk/lib/config.ts +++ b/cdk/lib/config.ts @@ -21,6 +21,7 @@ export interface Config { }; environment: string; lampiFileHandlerActive: string; + dbtProcessingEnabled: string; dbtCron: appscaling.CronOptions; profile: string; publicHostedZone: string; diff --git a/cdk/lib/ecs-stack.ts b/cdk/lib/ecs-stack.ts index 1faba09..c686448 100644 --- a/cdk/lib/ecs-stack.ts +++ b/cdk/lib/ecs-stack.ts @@ -43,8 +43,6 @@ export class EcsStack extends cdk.Stack { vpc: props.vpc, allowAllOutbound: true, }); - const dbtProcessingEnabled = - process.env.dbtProcessingEnabled?.toLowerCase() === 'true'; props.auroraSecurityGroup.addIngressRule( ecsSecurityGroup, @@ -101,6 +99,8 @@ export class EcsStack extends cdk.Stack { ); const schedule = appscaling.Schedule.cron(config.dbtCron); + const dbtProcessingEnabled = config.dbtProcessingEnabled?.toLowerCase() === 'true'; + const scheduledFargateTask = new ecsPatterns.ScheduledFargateTask( this, dbtFargateTaskName,