Skip to content

Commit

Permalink
[sdlf-foundations][cdk] avoid using a hardcoded stack name
Browse files Browse the repository at this point in the history
  • Loading branch information
cnfait committed Oct 23, 2024
1 parent 4b5181e commit bb61d96
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion sdlf-foundations/src/app.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
#!/usr/bin/env python3

import aws_cdk as cdk
import os

from foundations import Foundations

# Project specific
project_name = os.getenv("SEEDFARMER_PROJECT_NAME", "")
deployment_name = os.getenv("SEEDFARMER_DEPLOYMENT_NAME", "")
module_name = os.getenv("SEEDFARMER_MODULE_NAME", "")

if project_name:
stack_name = f"{project_name}-{deployment_name}-{module_name}"
else: # app.py not used in a seedfarmer context somehow
stack_name = "sdlf-foundations"

app = cdk.App()
stack = cdk.Stack(app, "FoundationsStack")
stack = cdk.Stack(app, stack_name)
Foundations(stack, "foundations")

app.synth()

0 comments on commit bb61d96

Please sign in to comment.