-
Notifications
You must be signed in to change notification settings - Fork 6
/
app.py
58 lines (48 loc) · 1.66 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import os
from aws_cdk import App, Environment, Aspects
from nitro_wallet.nitro_wallet_stack import NitroWalletStack
import cdk_nag
app = App()
NitroWalletStack(
app,
"devNitroValidator",
params={"deployment": "dev", "application_type": "eth2"},
env=Environment(region=os.environ.get("CDK_DEPLOY_REGION"),
account=os.environ.get("CDK_DEPLOY_ACCOUNT")),
)
NitroWalletStack(
app,
"prodNitroValidator",
params={"deployment": "prod", "application_type": "eth2"},
env=Environment(region=os.environ.get("CDK_DEPLOY_REGION"),
account=os.environ.get("CDK_DEPLOY_ACCOUNT")),
)
# If there are existing validator key table and KMS key,
# comment the code above and uncomment the code below!!
# NitroWalletStack(
# app,
# "devNitroValidator",
# params={
# "deployment": "dev",
# "application_type": "eth2",
# "kms_arn": "<INSERT_KMS_ARN_HERE>",
# "validator_key_table_arn": "<INSERT_DDB_KEY_TABLE_ARN_HERE>",
# },
# env=Environment(region=os.environ.get("CDK_DEPLOY_REGION", os.environ["CDK_DEFAULT_REGION"])),
# )
# NitroWalletStack(
# app,
# "prodNitroValidator",
# params={
# "deployment": "prod",
# "application_type": "eth2",
# "kms_arn": "<INSERT_KMS_ARN_HERE>",
# "validator_key_table_arn": "<INSERT_DDB_KEY_TABLE_ARN_HERE>",
# },
# env=Environment(region=os.environ.get("CDK_DEPLOY_REGION", os.environ["CDK_DEFAULT_REGION"])),
# )
Aspects.of(app).add(cdk_nag.AwsSolutionsChecks())
app.synth()