-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.py
34 lines (24 loc) · 989 Bytes
/
app.py
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
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
# vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab
import os
from cdk_stacks import (
OpsCollectionPipelineRoleStack,
OpsServerlessTimeSeriesStack,
OpsServerlessIngestionStack
)
import aws_cdk as cdk
AWS_ENV = cdk.Environment(account=os.getenv('CDK_DEFAULT_ACCOUNT'),
region=os.getenv('CDK_DEFAULT_REGION'))
app = cdk.App()
collection_pipeline_role = OpsCollectionPipelineRoleStack(app, 'OpsCollectionPipelineRoleStack')
ops_serverless_ts_stack = OpsServerlessTimeSeriesStack(app, "OpsServerlessTSStack",
collection_pipeline_role.iam_role.role_arn,
env=AWS_ENV)
ops_serverless_ts_stack.add_dependency(collection_pipeline_role)
ops_serverless_ingestion_stack = OpsServerlessIngestionStack(app, "OpsServerlessIngestionStack",
collection_pipeline_role.iam_role.role_arn,
ops_serverless_ts_stack.collection_endpoint,
env=AWS_ENV)
ops_serverless_ingestion_stack.add_dependency(ops_serverless_ts_stack)
app.synth()