-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathapp.py
40 lines (30 loc) · 749 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
35
36
37
38
39
#!/usr/bin/env python3
import os
import aws_cdk as cdk
from cdk_stacks import (
VpcStack,
BastionHostEC2InstanceStack,
KeyspaceStack,
KeyspaceTableStack
)
AWS_ENV = cdk.Environment(
account=os.environ["CDK_DEFAULT_ACCOUNT"],
region=os.environ["CDK_DEFAULT_REGION"]
)
app = cdk.App()
vpc_stack = VpcStack(app, 'KeyspaceVpcStack',
env=AWS_ENV)
keyspace_host = BastionHostEC2InstanceStack(app, 'KeyspaceClientHost',
vpc_stack.vpc,
env=AWS_ENV
)
keyspace_host.add_dependency(vpc_stack)
keyspace = KeyspaceStack(app, 'KeyspaceCassandra'
# ,env=AWS_ENV
)
keyspace.add_dependency(keyspace_host)
keyspace_tables = KeyspaceTableStack(app, 'KeyspaceTables'
# ,env=AWS_ENV
)
keyspace_tables.add_dependency(keyspace)
app.synth()