Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IT-4243: fix region lookup #21

Merged
merged 6 commits into from
Jan 30, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/aws-deploy.yaml
Original file line number Diff line number Diff line change
@@ -51,3 +51,4 @@ jobs:
run: cdk deploy --all --concurrency 5 --require-approval never
env:
ENV: ${{ inputs.environment }}
REGION: ${{ inputs.aws-region }}
10 changes: 7 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
@@ -13,13 +13,14 @@
from src.bastion_props import BastionProps
from src.bastion_stack import BastionStack

# Define stacks
cdk_app = cdk.App()
# get the region, or use a default
region = environ.get("REGION")
if region is None:
region = "us-east-1"

# get the environment and set environment specific variables
VALID_ENVIRONMENTS = ["dev", "stage", "prod"]
environment = environ.get("ENV")
region = cdk_app.region
match environment:
case "prod":
environment_variables = {
@@ -56,6 +57,9 @@
mongodb_port = 27017
vpn_cidr = "10.1.0.0/16"

# Define stacks
cdk_app = cdk.App()

# recursively apply tags to all stack resources
if environment_tags:
for key, value in environment_tags.items():