-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathapp.py
32 lines (21 loc) · 852 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
#!/usr/bin/env python3
import logging
import aws_cdk as cdk
from infra.pipeline_product_stack import BatchPipelineStack, DeployPipelineStack
from infra.service_catalog_stack import ServiceCatalogStack
# Configure the logger
logger = logging.getLogger(__name__)
logging.basicConfig(level="INFO")
# Create App and stacks
app = cdk.App()
# Attempts to retrieve custom bucket name and object key prefix for deployable assets.
artifact_bucket = app.node.try_get_context("drift:ArtifactBucket")
artifact_bucket_prefix = app.node.try_get_context("drift:ArtifactBucketPrefix")
# Create the SC stack
synth = cdk.DefaultStackSynthesizer(
file_assets_bucket_name=artifact_bucket,
generate_bootstrap_version_rule=False,
bucket_prefix=artifact_bucket_prefix,
)
ServiceCatalogStack(app, "drift-service-catalog", synthesizer=synth)
app.synth()