Skip to content

Commit 484cc9a

Browse files
authored
Added project montauk and external project buckets object (#977)
Strip s3 and prefix
1 parent db7a9ab commit 484cc9a

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

config/constants.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,3 +1016,15 @@ export const dataMartAthenaWorkgroup = 'orcahouse';
10161016
export const dataMartAthenaDataSource = 'orcavault';
10171017
export const dataMartAthenaDatabase = 'mart';
10181018
export const dataMartAthenaLambdaFunctionName = 'orcavault';
1019+
1020+
/*
1021+
External Projects
1022+
*/
1023+
export const externalProjectBuckets: Record<AppStage, string[]> = {
1024+
[AppStage.BETA]: [],
1025+
[AppStage.GAMMA]: [],
1026+
[AppStage.PROD]: [
1027+
// Project Montauk
1028+
'pipeline-montauk-977251586657-ap-southeast-2',
1029+
],
1030+
};

config/stacks/fileManager.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
vpcProps,
2121
ntsmBucket,
2222
dataSharingCacheBucket,
23+
externalProjectBuckets,
2324
} from '../constants';
2425

2526
export const fileManagerBuckets = (stage: AppStage): string[] => {
@@ -32,6 +33,11 @@ export const fileManagerBuckets = (stage: AppStage): string[] => {
3233
eventSourceBuckets.push(ntsmBucket[stage]);
3334
eventSourceBuckets.push(dataSharingCacheBucket[stage]);
3435

36+
/* Extend the event source buckets with the external project buckets */
37+
for (const bucket of externalProjectBuckets[stage]) {
38+
eventSourceBuckets.push(bucket);
39+
}
40+
3541
return eventSourceBuckets;
3642
};
3743

config/stacks/shared.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
oncoanalyserBucket,
2323
rdsMasterSecretName,
2424
vpcProps,
25+
externalProjectBuckets,
2526
} from '../constants';
2627
import { Duration, RemovalPolicy } from 'aws-cdk-lib';
2728
import { SchemaRegistryProps } from '../../lib/workload/stateful/stacks/shared/constructs/schema-registry';
@@ -175,6 +176,14 @@ export const getEventSourceConstructProps = (stage: AppStage): EventSourceProps
175176
patterns: eventSourcePattern(),
176177
});
177178

179+
for (const bucket of externalProjectBuckets[stage]) {
180+
props.rules.push({
181+
bucket: bucket,
182+
eventTypes,
183+
patterns: eventSourcePattern(),
184+
});
185+
}
186+
178187
return props;
179188
};
180189

0 commit comments

Comments
 (0)