-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathinfra.ts
More file actions
26 lines (21 loc) · 773 Bytes
/
infra.ts
File metadata and controls
26 lines (21 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { App } from 'aws-cdk-lib';
import { BenchmarkRestApiStack } from '../lib/restApi';
import { Monitoring } from '../lib/monitoring';
const app = new App();
const region = app.node.tryGetContext('region') ?? process.env.CDK_DEFAULT_REGION;
const account = app.node.tryGetContext('account') ?? process.env.CDK_DEFAULT_ACCOUNT;
const infraStack = new BenchmarkRestApiStack(app, 'benchmark-control-plane-stack', {
env: {
region,
account,
},
});
const monitoringStack = new Monitoring(app, 'benchmark-cp-monitor-stack', {
env: {
region: 'us-east-1',
account: process.env.CDK_DEFAULT_ACCOUNT,
},
restApi: infraStack.getRestApi(),
lambdaFunctions: infraStack.lambdaObject.getLambdaFunctions(),
});
monitoringStack.addDependency(infraStack);