-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
37 lines (30 loc) · 842 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
"""Top level entrypoint for CDK."""
import os
import aws_cdk as cdk
from infrastructure.certificate_stack import HostedUICertificateStack
from infrastructure.settings import Settings
from infrastructure.stack import RaktarStack
app = cdk.App()
try:
cdk_env = cdk.Environment(
region=os.environ["CDK_DEFAULT_REGION"],
account=os.environ["CDK_DEFAULT_ACCOUNT"],
)
except KeyError as e:
raise RuntimeError(
"Could not find AWS credentials, please ensure you're logged in."
) from e
settings = Settings()
hosted_ui_certificate_stack = HostedUICertificateStack(
app,
"RaktarHostedUICertificateStack",
settings=settings,
)
RaktarStack(
app,
"RaktarStack",
cdk_env=cdk_env,
settings=settings,
hosted_ui_certificate=hosted_ui_certificate_stack.certificate,
)
app.synth()