Skip to content

Commit

Permalink
Kontille DBT:n vaatimat ympäristömuuttujat
Browse files Browse the repository at this point in the history
  • Loading branch information
augustk committed Oct 4, 2024
1 parent 35790aa commit afad6a1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cdk/lib/ecs-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ export class EcsStack extends cdk.Stack {
image: dbtRunnerImage,
logDriver: logDriver,
memoryLimitMiB: 512,
environment: {
POSTGRES_HOST_PROD: `raportointi.db.${config.publicHostedZone}`,
DBT_PORT_PROD: '5432',
DBT_USERNAME_PROD: 'app',
},
secrets: {
DBT_PASSWORD_PROD: ecs.Secret.fromSsmParameter(
ssm.StringParameter.fromSecureStringParameterAttributes(
this,
`${config.environment}-auroraAppPassword`,
{
parameterName: `/${config.environment}/aurora/raportointi/app-user-password`,
}
)
),
},
},
schedule: appscaling.Schedule.expression('rate(5 minutes)'),
//schedule: schedule,
Expand All @@ -119,6 +135,7 @@ export class EcsStack extends cdk.Stack {

cdkNag.NagSuppressions.addStackSuppressions(this, [
{ id: 'AwsSolutions-IAM5', reason: "Can't fix this." },
{ id: 'AwsSolutions-ECS2', reason: 'Static environment variables' },
]);
}
}

0 comments on commit afad6a1

Please sign in to comment.